Sunday, September 25, 2011

Http post formats

So, there are two ways to post data to www server. 

For application/x-www-form-urlencoded, the body of the http  message sent to the server is essentially one giant query string -- name/value pairs are separated by the ampersand (&), and names are separated from values by the equal symbal (=).

Talking about multipart/form-data data is send in pairs too, but each pair is represented as a "part" in a mime message. Parts are separated by a particular string boundary (chosen specifically so that this boundary string does not occur in any of the "value" payloads). The value piece of each name/value pair is now the payload of each part of the mime message.

MIME message saves space, when dealing with large amounts with data, and first one - for short data.

No comments:

Post a Comment