Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 5 Transport Communication : Set Content-Type for Error Response

Set 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 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, do the following:
1.
Navigate to the ASG_CONFIG_HOME directory.
2.
3.
tibco.clientVar.ASG/Response/DefaultContentType
For example, you can set the property to application/xml as follows:
tibco.clientVar.ASG/Response/DefaultContentType=application/xml
If the tibco.clientVar.ASG/Response/DefaultContentType property is set to application/xml or text/xml, the error response is returned in xml format to the requestor.
If the tibco.clientVar.ASG/Response/DefaultContentType property is set to application/xml or text/xml, the error response is returned in json format to the requestor.

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved