node-oauth
node-oauth copied to clipboard
Add support for setting Content-Type on GETs
The current implementation forces the Content-Type header to be "application/x-www-form-urlencoded", when using consumer.get.
Some services do not support this Content-Type header on a GET. Whether they are right or wrong to do this, it makes it impossible to use .get for these endpoints.
I propose support for a default Content-Type header, settable via the customHeaders parameters of the constructor and overridable via the post_content_type parameter of _performSecureRequest
This is affecting me too. This should certainly be overridable. It should also be possible to leave Content-Type unset for methods that don't contain bodies. Content-Type is meaningless on a GET, HEAD, or DELETE request.
+1
+1