Content types for using the Web Gateway
File transfer requests that you submit to the WebSphere® MQ File Transfer Edition Web Gateway must correspond to certain media types. Responses from the Web Gateway have a media type of application/xml or application/json.
Request
Content transferred to WebSphere MQ File Transfer Edition using HTTP must be in one of the formats in the following table.
Media-type | Valid WMQFTE resources | Allowed verbs |
---|---|---|
multipart/form-data | File (transfers of multiple files or transfers with metadata) | POST, GET, DELETE |
application/xml | Transfer, Filespace | POST, GET, DELETE |
When you POST a file as part of a multipart request any media type can be used in each multipart boundary. The media type of the file determines whether the file transfer is in binary or text mode, unless the mode is overridden with the x-fte-type header.
Media-type | Transfer mode used |
---|---|
text/* | text |
application/xml | binary |
Any other media-type | binary |
Response body
The Web Gateway can return a response with a media type of application/xml or application/json in response to both file upload requests (POST of a FILE resource) and transfer status requests (GET of a TRANSFER resource). For more information about JSON and XML response formats, see Response formats: XML and JSON. The Web Gateway can return a response with any media type in response to a file download request (GET of a FILESPACE resource).