Code (HttpResponse function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
m (match syntax table to syntax template; edits, tags and links)
 
Line 1: Line 1:
{{Template:HttpResponse:Code subtitle}}
{{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").


This method lets you check 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").
==Syntax==
==Syntax==
{{Template:HttpResponse:Code syntax}}
{{Template:HttpResponse:Code syntax}}
===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==
==See also==
{{Template:HttpResponse:Code footer}}
{{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