Access to HTTP request/response pairs

Conditions used within HttpParsingRule rules can access details of HTTP requests / responses with the ApplyTo property.

"Http" [ ".Initial" | ".Final" ] ( ".Request" | ".Response" ) [ "." Component ]

The optional component Initial or Final is only significant in cases where HTTP requests are part of a redirection chain. In such cases, Initial returns the first HTTP request in the chain; Final returns the last request in the chain.

Final is the default for conditions in the HttpParsingRule\Search section.

Initial is the default for conditions in the HttpParsingRule\ScriptGen section.

Valid Component values for HTTP requests, plus return values:
(empty) Equal to Header
Body Request body
RequestLine Request line (i.e., Method + URL + HTTP version)
Method HTTP method
Version HTTP version
Header Complete request header, including request line
Header.* Use this to reference any HTTP request header
Url Complete request URL
Url.Complete Complete request URL
Url.BaseUrl URL without query string
Url.DirectUrl Relative request URL (without scheme and host)
Url.BaseDirOnlyUrl URL without query string and file name
Url.Scheme URL scheme (HTTP, HTTPS or FTP)
Url.Host Host name in URL
Url.Port Port in URL
Url.Path Path (directory plus file name)
Url.Dir Directory
Url.File File name
Url.Ext File extension
Url.Username User name
Url.Password Password
Url.Query Query string, including "?"
Url.QueryData Query string, excluding "?"
Url.Coords Image coordinates
Valid Component values for HTTP responses:
(empty) Equal to Header
Body Response body
StatusLine

Response status line (i.e., HTTP version plus status code and status phrase)

Version HTTP version
StatusCode HTTP response status code
StatusPhrase HTTP response status phrase
Header Complete response header, including status line
Header.* Use this to reference any HTTP response header

Examples

<ApplyTo>Http.Response.Header.Content-Type</ApplyTo>
<ApplyTo>Http.Response.Header</ApplyTo>
<ApplyTo>Http.Request.Url.QueryData</ApplyTo>
<ApplyTo>Http.Request.Body</ApplyTo>
<ApplyTo>Http.Response.StatusCode</ApplyTo>