Receives and Invokes support multipart HTTP messages.
There are two distinct classes of multipart messages, multipart/form-data and all others (for example, mixed, related, digest, parallel). Multipart/form-data represents data from an HTML form construct that can have parameters and files.
Receives
Multipart messages are parsed and populated in the
RESTRequest
message as a payload and attachments. The first textual message part is the payload all others are attachments.
For multipart/form-data, parameters are converted to
RESTRequest
message parameters. The first textual form data file becomes the payload, all others are message attachments. When there are no textual files there is no payload only attachments.
Invokes
Multipart messages are created implicitly when there are at least two of any combination of payload and attachments. The default Content-Type sent is multipart/mixed unless a multipart Content-Type header is defined in the
RESTRequest
message. An explicit Content-Type header of type multipart/form-data changes the behavior to emulate an HTML form submission. In this case all
RESTRequest
parameters in the payload are treated as HTML INPUT parameters, and attachments are treated as files.