well like mentioned in your referring question, there are two ways in which encoding a post
of a form could be send: application/x-www-form-urlencoded
or multipart/form-data
.
Both of them will be send in the body of the post
request. and not like with a get
where it is passed with the url itself.
Here is an example of both:
http://www.htmlcodetutorial.com/forms/form_enctype.html
you could say part
is the other representation of the parameter name in the urlencoded form of an get
request.
urlencoded: realname=
part: Content-Disposition: form-data; name="realname"
the different parts are separated by a boundary defined in the header:
Content-type: multipart/form-data; boundary=---------------------------7cd1d6371ec
EDIT
bedside the difference in the encoding the most importent thing is, that with multipart/form-data
the client has the possibility to add additional informations to the key/value pair like the type of the value (e.g. Content-Type: image/jpeg
) or the file name. With this information it is possible for the server to do certain actions for the different types of values.
When you use application/x-www-form-urlencoded
it is not possible to store additional infos for a key/value pair in a standardized way.
Thats the reason why you have to use multipart/form-data
if you want to submit files with the post
request. It is not because it would not be possible to pass the file as a base64 encoded value in the url format, but because there is no standart way with the urlencoding to tell the server that it is a file and not a string.