meteor-collectionapi icon indicating copy to clipboard operation
meteor-collectionapi copied to clipboard

Allow HTTP form POST in addition to HTTP json POST

Open 3-16 opened this issue 12 years ago • 0 comments

Although the optimal and most common way is to send JSON data to a REST API, there are cases when you need to use existing systems to POST and PUT data. These can send a common HTTP form like "value1=data1&data2=value2"

Check if the submitted data is in JSON format. If it is not, try to use querystring.parse(requestData) to convert the requestData to JSON format. If this does not work either, send the error message to the client.

3-16 avatar Feb 18 '13 20:02 3-16