Saturday, June 10, 2017

performance issues in application/json vs application/x-www-form-urlencoded

alternative 1:

httpPost.setHeader("Content-Type", "application/x-www-form-urlencoded");


alternative 2:

httpPost.setHeader("Content-Type", "application/json"); 


using application/x-www-form-urlencoded in Content-Type 3mb POST is taking 101 seconds
using json content type 3mb POST is taking 2 seconds
For a discussion on what is what, see here http://stackoverflow.com/questions/9870523/differences-in-application-json-and-application-x-www-form-urlencoded



No comments: