In addition, HTTP headers have information about
HTTP connection types, proxies, and so on. Most of
these headers are for managing connections between a
client, a server, and proxies.
Headers are classified as request headers and response
headers. You have to set the request headers when
sending a request API and have to set the assertion
against the response headers to ensure that the correct
headers are returned.
Request Headers
The request headers appear as name:value pairs.
Multiple values, separated by commas, can be specified
as follows:
Click here to view code image
request-header-name: request-header-value1,
request-header-value2, ...
The following are some examples of request headers:
Click here to view code image
Host: myhouse.cisco.com
Connection: Keep-Alive
Accept: image/gif, image/jpeg, */*
Accept-Language: us-en, fr, cn
Response Headers
The response headers also appear as name:value pairs.
As with request headers, multiple values can be specified
as follows:
Click here to view code image
response-header-name: response-header-value1,
response-header-value2, ...
The following are some examples of response headers: