Setting Content-Type for Error Response
Using TIBCO API Exchange Gateway, you can set the Content-Type for the error message if the Content-Type is not set in the HTTP header of the incoming request.
When the error response is returned for any incoming request from TIBCO API Exchange Gateway, the content-type of the error response is set as follows:
- If the HTTP header of the incoming request message contains the Content-Type, TIBCO API Exchange Gateway sets the content type of the error response to the content type of the request message.
- If the HTTP header of the incoming request message does not contain the Content-Type, TIBCO API Exchange Gateway sets the content type of the error response using the tibco.clientVar.ASG/Response/DefaultContentType property. The property is set in the ASG_CONFIG_HOME/asg.properties file. See tibco.clientVar.ASG/Response/DefaultContentType.
Note: If the
tibco.clientVar.ASG/Response/DefaultContentType property is not set, TIBCO API Exchange Gateway sets the Content-Type of the error response message to application/json.
To set the Content-Type for the error response from TIBCO API Exchange Gateway for any incoming request, follow these steps:
Procedure
- Endpoint Ports
Default ports for components of TIBCO API Exchange Gateway.
Copyright © Cloud Software Group, Inc. All rights reserved.