Skip to main content

Rest GetResponseHeader

Use this command to retrieve a specified response header for the REST EXECUTEGET, REST EXECUTEHEAD, REST EXECUTEPOST, or REST EXECUTEPUT command that was previously invoked. The response header is reset after any REST EXECUTEGET, REST EXECUTEHEAD, REST EXECUTEPOST, or REST EXECUTEPUT command.

Syntax:

REST GETRESPONSEHEADER ResponseHeaderName VariableName

where:

  • ResponseHeaderName is the name of the header to retrieve
  • VariableName is the name of a string variable that will contain the value of the specified response header.

Syntax example:

CREATE VARIABLE TestResponseHeader as String

REST GETRESPONSEHEADER “Content-Type” TestResponseHeader

EXPORTVARIABLE TestResponseHeader TestResponseHeader.txt

Was this article helpful?

We're sorry to hear that.