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
It appears to be a bug. While the server supports multiple formats for returning data (JSON, XML, text, etc), it only accepts JSON data for POSTs and PUTs. I suppose most people just use this server for JSON and so we haven't discovered this error until now.
If you're going with JSON anyway you could just pass JSON data in and it would work. If you want to support application/x-www-form-urlencoded data you'll need to update the getData() method to parse the content type being sent and work accordingly. Pull requests welcome!
Activity
jacwright commentedon Jun 22, 2016
It appears to be a bug. While the server supports multiple formats for returning data (JSON, XML, text, etc), it only accepts JSON data for POSTs and PUTs. I suppose most people just use this server for JSON and so we haven't discovered this error until now.
If you're going with JSON anyway you could just pass JSON data in and it would work. If you want to support application/x-www-form-urlencoded data you'll need to update the
getData()method to parse the content type being sent and work accordingly. Pull requests welcome!tyzoid commentedon Jul 18, 2017
The question is if it works by specifying JSON. If it does, I'd be happy to tag this as a feature-request.