Setting the content type on a URL


#1

It would be nice if the URL class or more specifically it’s createInputStream method allowed users to pass over the MIME content type that should be used by the request. Currently, the content type is hard coded to “application/x-www-form-urlencoded”, and although you can pass over additional headers, if you pass over a content type, it just gets appended on to your request which then has two content types. I’m trying to use this class to interact with a web-service that supports multiple different protocol types, and it uses the content type to identify which protocol is being requested.