Integration Server 10.3 | Integration Server Administrator's Guide | Content Handlers in Integration Server | About Content Handlers for HTTP Responses | Accept Header Field
 
Accept Header Field
The Accept header field specifies which content type or types the client will accept in the response. The Accept header field can specify multiple acceptable content types, either by listing them (application/json, text/html, text/xml, and so on), or by using wildcards (text/*).
By default, if the Accept header specifies a content type using a wildcard, Integration Server will select the first content handler registered for that major type (text, application, multipart).
The following table identifies the content handler that Integration Server selects based on the value of the Accept header field.
This Accept Header field
Results in this content handler
text/*
XML
application/*
CGI
multipart/*
Multipart
To control which content handler Integration Server will use when a wildcard is specified in the Accept header, you must use the watt.server.content.type.mappings server configuration parameter. The syntax for this parameter is:
watt.server.content.type.mappings=<wildcard1> <content-type1>,<wildcard2> <content-type2>,<wildcardN> <content-typeN>
For example, to associate text/* with text/xml and multipart/* with multipart/related, specify the parameter as follows:
watt.server.content.type.mappings=text/* text/xml,multipart/* multipart/related
The Accept header might contain multiple content types with parameters indicating an order of preference. Integration Server will attempt to respond with the "most preferred" content type as defined by RFC 2616, section 14.
Integration Server supports the Accept header field in HTTP request headers if the watt.server.http.useAcceptHeader configuration parameter is set to true. The default setting for this parameter is true.