Views:

The following headers can be used to provide meta information about a request.

Table 1. Request headers

Header

Type

Mandatory

Description

Authorization

String

Yes

Authentication information to prove you are authorized to access the resources you requested.

Trend Micro Email Security supports HTTP basic authentication. The client sends HTTP requests with the Authorization header that consists of Basic and a Base64-encoded string username:apikey.

For example, if the user name is apitest01 and the API key you obtained is d9dfae099217ea5fe0752f2511d15f937e2b785d, convert the string apitest01:d9dfae099217ea5fe0752f2511d15f937e2b785d to Base64 encoded format, and the following is generated:

YXBpdGVzdDAxOmY5ZGZhZTA5OTIxN2VhNWZlMDc1MmYyNTExZDE1ZjkzN2UyYjc4NWQ=

In this case, the Authorization header will be:

Authorization: Basic
   YXBpdGVzdDAxOmY5ZGZhZTA5OTIxN2VhNWZlMDc1MmYyNTExZDE1ZjkzN2UyYjc4NWQ=
Note:

The plain text string username:apikey must NOT contain any trailing characters such as "\n" or "\r\n".

Accept-Encoding

gzip/deflate

No

List of acceptable encodings to support compression.

To improve the transfer speed and bandwidth utilization, Trend Micro Email Security supports HTTP compression with the following compression schemes:

  • gzip

  • deflate

If HTTP compression is required in the request, the header Accept-Encoding should be added with the supported compression scheme.

Here is an example:

Accept-Encoding: gzip,deflate

Content-Encoding

gzip/deflate

No

Encoding used on data in the request body.

The following compression schemes are supported:

  • gzip

  • deflate

For example, if the body is encoded by "gzip", the following header should be added:

Content-Encoding: gzip