Overriding Media Types (For Service Only)

You can override the media types to be consumed or produced by using HTTP headers.

The Media Type configured in the UI serves as the default media type for both the HTTP Request body content type and for the HTTP Response body content type.

Note: You need to specify this information only if your REST client has to override the media type on a per message basis. In most cases, the configuration specifies the media type that is used throughout the application.
Override the content type based on the message type.
Option Description
Request Set the Content-Type header in the HTTP RequestClients to override the request body content type. The values are:
  • Content-Type: application/json
  • Content-Type: application/xml
  • Content-Type: application/bjson
Response Set the Accept header in the HTTP RequestClients to override the response content type. The values are:
  • Accept: application/json
  • Accept: application/xml
  • Accept: application/bjson