Work with message headers

HTTP headers are an important part of your API messages. They enable the transfer of data between a server and a client.

The Headers list allows you to work with the headers of your API requests and responses. You can edit headers, for instance, or create Module Attributes to use them in your TestCases.

To use your message headers, follow the steps below:

  1. Select the message you want to work with.

  2. Click on Headers on the right side of the message section. This expands the Headers list.

Headers list

  1. Double-click on a header to edit it.

  2. To create a header Module Attribute, select the header and click Add in the API Testing menu.

Headers with the same name

A message can have multiple headers with the same name, but with different values. When you create a header Module Attribute, the API Engine automatically adds an index number to the header property Path to differentiate between headers with the same name.

For example, your message contains a header Allow with the value GET and a header Allow with the value HEAD. When you create Module Attributes, the API Engine creates path Allow[0] and Allow[1].