Code (HttpResponse function): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (match syntax table to syntax template; edits, tags and links) |
||
(One intermediate revision by one other user not shown) | |||
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"). | |||
==Syntax== | ==Syntax== | ||
{{Template:HttpResponse:Code syntax}} | {{Template:HttpResponse:Code syntax}} | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>% | <tr><th>%string</th> | ||
<td>A string, longstring, or numeric variable for the assignment of the current Code value of | <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> | <tr><th>httpResponse</th> | ||
<td>A reference to an | <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> | |||
==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. |