RequestHeader
Structure
RequestHeader(sHeader)
Parameters
| Parameter | Type | Description
| sHeader | String | name of the request header to look up. Sometimes header request names are standard (like 'content-type') but typically you would need to know this specific custom header name as generated by the http client |
Return Value
String
Description
Use this function to return the value for a specific header in the Web Packet request. Tip: to see a full slate of all these values for an actual web request, turn on 'Log All Requests' before turning on the IndySoft REST Server, then check the log of a web request in the 'History / Status' grid in IndySoftSyncOptions utility. This log will return values for all headers in the web packet request
Example
if RequestHeader("X-CustomHeader") = "E12" then
ResponseStatusCode(607)
ResponseBodyAsText("E12 scenario - appropriately handled")
End If |