Content-Type: HTTP entity-header
Set or return the class of the JMS message in a WebSphere® MQ message according the to HTTP content-type.
Type | Description |
---|---|
HTTP header name | Content-Type |
HTTP header type | Entity-header |
Valid in HTTP request message | POST, x-msg-require-headers |
Allowed or returned value |
|
x-msg-class | HTTP Content-Type |
---|---|
BYTES |
application/octet-stream
application/xml |
TEXT |
text/*
|
MAP |
application/x-www-form-urlencoded
application/xml (optional) |
STREAM |
application/xml (optional)
|
Description
- On an HTTP POST request, specify either the Content-Type or the x-msg-class. If you
specify both, they must be consistent or an
HTTP Bad Request
exception,Status code 400
is returned. If you omit both, the Content-Type and the x-msg-class, a Content-Type oftext/*
is assumed. - The Content-Type is always set in the response to an HTTP GET or DELETE that has a message body. The Content-Type is set according to the rules in Table 2.
Message format | JMS Message type | x-msg-class | Content-Type |
---|---|---|---|
Anything except MQFMT_STRING |
None | BYTES |
application/octet-stream |
MQFMT_STRING |
None | TEXT |
text/plain |
MQFMT_NONE |
jms_bytes |
BYTES |
application/octet-stream |
MQFMT_NONE |
jms_text |
TEXT |
text/plain |
MQFMT_NONE |
jms_map |
MAP |
application/xml |
MQFMT_NONE |
jms_stream |
STREAM |
application/xml |