You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Leaving the "Content-Type" header set for all requests (including GET which does not have any body) seems to confuse the Express.js router and a simple GET to /resource after a POST to /resource with 'Content-Type': 'application/json' returns 400.
Would it be right to remove the header for GET requests? If so I'll make a pull request.
The text was updated successfully, but these errors were encountered:
I got the same error code 400 and after adding ".removeHeader('Content-Type', 'application/json')" before calling get worked well with me.
more info about removeHeader is available at http://flatiron.github.io/api-easy/#section-8
Leaving the "Content-Type" header set for all requests (including GET which does not have any body) seems to confuse the Express.js router and a simple GET to /resource after a POST to /resource with 'Content-Type': 'application/json' returns 400.
Would it be right to remove the header for GET requests? If so I'll make a pull request.
The text was updated successfully, but these errors were encountered: