AddHeader (HttpRequest subroutine): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (1 revision) |
(No difference)
|
Revision as of 22:42, 15 June 2011
Template:HTTPRequest:AddHeader subtitle
This method lets you add an HTTP request header to the HTTP request that will be sent to the HTTP server.
Syntax
Template:HTTPRequest:AddHeader syntax
Syntax terms
%httpreq | A previously defined and instantiated HTTPRequest object. |
---|---|
header | A string expression that names an HTTP request header such as “accept-encoding.” Header names are case insensitive.
Passing multiple occurrences is allowed: if a same-named header is already present, an additional occurrence is added. |
value | A string expression that yields a value for the request header. |
Usage notes
- For HTTP Version 1.1 mode only,
the HTTP Request header “connection: close” is automatically
sent on GETs and POSTs to ensure that the server closes the
connection with the client when the HTTP Request completes.
The HTTP Helper does not support persistent connections.
If you try to set a "connection" header using
AddHeader, any value
except
close
results in request cancellation.
Note: If you explicitly set "connection" toclose
, the automatic generation of "Connection: close" is suppressed to ensure that an extra connection header is not sent.