Citrix Systems 9.2 Manual Do Utilizador
Chapter 11 Advanced Policies: Sending HTTP Service Callouts to Applications
187
•
Parameters that the NetScaler uses to create an HTTP request or a single
parameter that contains a fully-formed HTTP request.
parameter that contains a fully-formed HTTP request.
•
Parameters for extracting data of interest from the HTTP response.
Note on the Format of an HTTP Request
You can specify a literal HTTP request in an HTTP callout policy. Even though
this is not required, it is useful to have a general idea of the format of an HTTP
request before configuring an HTTP callout.
this is not required, it is useful to have a general idea of the format of an HTTP
request before configuring an HTTP callout.
An HTTP request contains a series of lines that each end with a carriage return
and a line feed, represented as either <CR><LF> or \r\n.
and a line feed, represented as either <CR><LF> or \r\n.
The first line of a request contains the HTTP method and target. For example, a
message line for a GET request contains the keyword GET and a string that
represents the object that is to be fetched, as in the following example:
message line for a GET request contains the keyword GET and a string that
represents the object that is to be fetched, as in the following example:
GET /mysite/mydirectory/index.html HTTP/1.1\r\n
The rest of the request contains HTTP headers, including a required Host header
and, if applicable, a message body.
and, if applicable, a message body.
The request ends with a bank line (an extra <CR><LF> or \r\n).
Following is an example of a request:
Get /mysite/index.html HTTP/1.1\r\n
Host: 10.101.101.10\r\n
Accept: */*\r\n
\r\n
Note on the Format of an HTTP Response
Because the callout policy extracts data from an HTTP response, it is useful to
have a general idea of the format of an HTTP response before configuring an
HTTP callout policy.
have a general idea of the format of an HTTP response before configuring an
HTTP callout policy.
An HTTP response contains a status message, response HTTP headers, and the
requested object, or, if the requested object cannot be served, an error message.
requested object, or, if the requested object cannot be served, an error message.
Following is an example of a response:
HTTP/1.1 200 OK\r\n
Content-Length: 55\r\n
Content-Type: text/html\r\n
Last-Modified: Wed, 12 Aug 1998 15:03:50 GMT\r\n
Accept-Ranges: bytes\r\n
ETag: “04f97692cbd1:377”\r\n
Date: Thu, 19 Jun 2008 19:29:07 GMT\r\n
\r\n
<55-character response>