What headers should I add in my Hotel-X queries and mutations?

Below you will find a list of the headers that can be added to your queries and mutations and whether they are mandatory or optional.

Mandatory

Gzip Compression

In order to increase performance and save bandwidth, all the live traffic must enable GZIP compression in the HTTP header. For insatnce:

Optional

Keep Alive

In order to increase performance and improve response times (in Search),
you can add the Connection: keep-alive header to all our transactions.

GraphQL To Rest

In case you expect to be returned +5k options per search response, we
suggest using our GraphQL to Rest feature to keep performance at the
highest level.


To implement this feature, please follow below steps:

  1. Check that your JSON parser is updated to the last schema as the Array
    Fields previously defined as single Scalars can produce unexpected JSON
    marshalling
  2. Add the HTTP header to your request(s): TGX-Content-Type:graphqlx/json
  3. Test a sample call for every request using the header
  4. Enjoy the performance