HeaderCount (HttpResponse function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Template:HttpResponse:HeaderCount subtitle}}
The <var>HeaderCount</var> method helps you retrieve the HTTP response headers returned by an HTTP request. <var>HeaderCount</var> returns the number of headers returned by the server, if it is called with no argument.  If it is called with a header-name argument, the number of occurrences of that particular header is returned.


<span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span>
[[Category:HttpResponse methods|HeaderCount function]]
<p>
<var>HeaderCount</var> is a member of the <var>[[HttpResponse class|HttpResponse]]</var> class.
</p>
This method helps you retrieve the HTTP
response headers returned by an HTTP request.
HeaderCount returns the number of headers returned by the server, if
it is called with no argument.
If it is called with a headername argument,
the number of occurrences of that particular header is returned.
==Syntax==
==Syntax==
<p class="syntax">%ct = %httpresp:HeaderCount[(name)]
{{Template:HttpResponse:HeaderCount syntax}}
</p>
 
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%ct</th>
<tr><th>%number</th>
<td>A numeric variable.
<td>A numeric variable.</td></tr>
<tr><th>httpResponse</th>
<td>A reference to an <var>[[HttpResponse_class|HttpResponse]]</var> object that was returned by a <var>[[Get_(HttpRequest_function)|Get]]</var>, <var>[[Post_(HttpRequest_function)|Post]]</var>, or <var>[[Send_(HttpRequest_function)|Send]]</var> method of an <var>[[HttpRequest_class|HttpRequest]]</var> object.
</td></tr>
</td></tr>
<tr><th>%httpresp</th>
<tr><th>string</th>
<td>A reference to an HTTPResponse object that was returned by a Get, Post, or Send method of an HTTPRequest object.
<td>A string expression that yields the name of an HTTP response header. Specifying such a name returns the number of occurrences of this header.
</td></tr>
<tr><th>name</th>
<td>A string expression that yields the name of an HTTP response header. Specifying ''name'' returns the number of occurrences of this header.
Header names are case-insensitive.
Header names are case-insensitive.
</td></tr></table>


</td></tr></table>
==See also==
{{Template:HttpResponse:HeaderCount footer}}

Latest revision as of 19:48, 20 June 2011

Number of HTTP response headers (HttpResponse class)

The HeaderCount method helps you retrieve the HTTP response headers returned by an HTTP request. HeaderCount returns the number of headers returned by the server, if it is called with no argument. If it is called with a header-name argument, the number of occurrences of that particular header is returned.

Syntax

%number = httpResponse:HeaderCount[( [string])]

Syntax terms

%number A numeric variable.
httpResponse A reference to an HttpResponse object that was returned by a Get, Post, or Send method of an HttpRequest object.
string A string expression that yields the name of an HTTP response header. Specifying such a name returns the number of occurrences of this header.

Header names are case-insensitive.

See also