Add multipart support in HTTP client
As documented, multipart HTTP requests and responses are not currently supported properly by the Saxon-JS HTTP client (
Note that multipart HTTP requests are not currently implemented. Some rules anticipate these being available.
Multipart responses are not currently properly handled. A multipart response will be returned as one text/plain body in body (rather than an array of body parts in multipart-bodies.)
It has always been on the todo list to extend the support for multipart HTTP messages, but there has been no progress on this for some time.
#1 Updated by Debbie Lockett about 1 year ago
For the specific problem with sending
Usually to send
FormData as the request body, the
media-type should be
multipart/form-data, and the
boundary must be set. (See https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST)
FormData is to not set the
Content-Type header explicitly, but rather to leave it undefined and to let
XMLHttpRequest in the browser set it to supply the boundary automatically (see https://stackoverflow.com/questions/40351429/formdata-how-to-get-or-set-boundary-in-multipart-form-data-angular).
However this is not possible with
ixsl:schedule-action/@http-request, because here the
media-type is mandatory (in the supplied
We should review this condition, since even in the absence of full support for multipart HTTP requests, making
media-type optional could allow support for sending
Please register to edit this issue