HTTP Headers - geo_addressing_sdk - 5.0

Geo Addressing SDK Developer Guide

Product type
Software
Portfolio
Locate
Product family
Geo Addressing
Product
Geo Addressing SDK
Version
5.0
Language
English
Product name
Geo Addressing SDK
Title
Geo Addressing SDK Developer Guide
Copyright
2023
First publish date
2007
ft:lastEdition
2024-07-12
ft:lastPublication
2024-07-12T13:44:57.839102

To negotiate the content type being sent between the client and service, the request includes an Accept header to indicate the acceptable media type. Optionally, it can also indicate the MIMEContent-Type being sent in the request.

The response from the server will return a status code and the Content-Type of the response.

The following are example HTTP content negotiation headers for JSON and XML:

JSON
Accept: application/json; charset=utf-8
Content-Type: application/json; charset=utf-8
XML
Accept: application/xml; charset=utf-8
Content-Type: application/xml; charset=utf-8

The following table defines the type of response to expect based on the header information specified in the request.

Request Header Information Response Content Type
service_name.json No special header information. json
service_name.json

Content-Type: application/xml; charset=utf-8
Accept: application/xml; charset=utf-8

xml
service_name.json

Content-Type: application/json; charset=utf-8
Accept: application/json; charset=utf-8

json
service_name

Content-Type: application/json; charset=utf-8
Accept: application/json; charset=utf-8

json
service_name

Content-Type: application/xml; charset=utf-8
Accept: application/xml; charset=utf-8

xml
service_name No special header information. json
service_name.xml

Content-Type: application/json; charset=utf-8
Accept: application/json; charset=utf-8

json
service_name.xml

Content-Type: application/xml; charset=utf-8
Accept: application/xml; charset=utf-8

xml
service_name.xml No special header information. xml