Skip to main content

Getting an HTTP Header by Name

Getting an HTTP Header by Name

The %Net.HttpResponseOpens in a new tab class stores its HTTP headers in an InterSystems IRIS multidimensional array. To access the headers, use the following methods:

GetHeader()

Returns the value of the given header.

GetNextHeader()

Returns the name of the next header after the given header.

Each of these methods takes a single argument, a string that is the name of an HTTP header.

You can also use the OutputHeaders() method, which writes the HTTP headers to the current device (although not in the same order they were generated).

FeedbackOpens in a new tab