Code (HttpResponse function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with " <span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span> Code property <p> <var>Code</var> is a member of the <var>[[...")
 
m (match syntax table to syntax template; edits, tags and links)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Template:HttpResponse:Code subtitle}}
The <var>Code</var> method lets you examine the HTTP status code value in the status line of the result of the most recent HTTP request.  <var>Code</var> returns only the code portion of the status line (for example, "200").


<span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span>
[[Category:HttpResponse methods|Code property]]
<p>
<var>Code</var> is a member of the <var>[[HttpResponse class|HttpResponse]]</var> class.
</p>
This non-settable method lets you check the HTTP status
code value in the status line of the
result of the most recent HTTP request.
Code returns only the code portion of the status line (for example, "200").
==Syntax==
==Syntax==
<p class="syntax">%code = %httresp:Code
{{Template:HttpResponse:Code syntax}}
</p>
 
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%code</th>
<tr><th>%string</th>
<td>A string, longstring, or numeric variable for the assignment of the current Code value of ''%httpresp''.
<td>A string, <var>[[longstrings|longstring]]</var>, or numeric variable for the assignment of the current Code value of <var class="term">httpResponse</var>.
</td></tr>
</td></tr>
<tr><th>%httpresp</th>
<tr><th>httpResponse</th>
<td>A reference to an HTTPResponse object that was returned by a Get, Post, or Send method of an HTTPRequest object.
<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> methods of an <var>[[HttpRequest_class|HttpRequest]]</var> object.</td></tr>
</table>


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

Latest revision as of 05:22, 19 June 2011

Check HTTP status code of most recent request (HttpResponse class)

The Code method lets you examine the HTTP status code value in the status line of the result of the most recent HTTP request. Code returns only the code portion of the status line (for example, "200").

Syntax

%string = httpResponse:Code

Syntax terms

%string A string, longstring, or numeric variable for the assignment of the current Code value of httpResponse.
httpResponse A reference to an HttpResponse object that was returned by a Get, Post, or Send methods of an HttpRequest object.

See also