From our perspective, when we use the multipart/form-data,
when this is included into a HTTP request
message that is going to the server-side, then in the header of the request message,
you will have a content type set to multipart/form-data.
And then also a boundary value set up like that.
The boundary separates the multiple parts of the request body.
So the request body itself of the outgoing request message will be divided
into multiple parts.
And each part will be delineated from the previous part
by by using this boundary here.
Now, in order to further illustrate to you the details, I have rigged up
the server to print out this information from the incoming request message.
So that we can examine this in a bit more detail.
Taking a look at the details for
a specific message that I have sent from my postman to the server-side,
you can notice that here, I have printed the request headers here.
And in particular, in the request header, let me draw your attention to this header
here, called content type, which is set to multipart/form-data.
And then note in particular the boundary defined here
with this long number in here.
So that is the request header for
the incoming request message that I have posted by using post method.
In fact, this is exactly the request message that I will be using
in the exercise that follows this lecture in order to upload the file.
So when we upload that file there, all right, you will notice that in
the request body, so this is where I print out the request body down below here.
And in the request body,
you will notice that it prints out this particular line here.
And this corresponds to the boundary that is specified here.
So this boundary essentially specifies the separation between the various parts of
the multipart body that is part of this request message.
So in the request body, you'll see this being defined here.
In addition, you will also specify the same Content-Disposition as form-data,
so which means they'll interpret this as form data and
the corresponding name a s imageFile.