Success (HttpResponse function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:HttpResponse:Success subtitle}}
{{Template:HttpResponse:Success subtitle}}
The <var>Success</var> method lets you check the status code value in the status line of the result of the most recent <var>[[Get (HttpRequest function)|Get]]</var>, <var>[[Post (HttpRequest function)|Post]]</var>, or <var>[[Send (HttpRequest function)|Send]]</var> operation.


This non-settable method lets you check the status
code value in the status line of the
result of the most recent <var>[[Get (HttpRequest function)|Get]]</var>, <var>[[Post (HttpRequest function)|Post]]</var>, or <var>[[Send (HttpRequest function)|Send]]</var> operation.
==Syntax==
==Syntax==
{{Template:HttpResponse:Success syntax}}
{{Template:HttpResponse:Success syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%boolean</th>
<tr><th>%number</th>
<td>A numeric variable for the assignment of the Success value of ''%httpresp''. Success returns 1 (True) if the HTTP status code is in the 200s (success range), and it returns 0 (False) otherwise.
<td>A numeric variable for the assignment of the <var>Success</var> value of <var class="term">httpResponse</var>. <var>Success</var> returns 1 (True) if the HTTP status code is in the 200s (success range), and it returns 0 (False) otherwise.
</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</var>, <var>Post</var>, or <var>Send</var> method of an <var>[[HttpRequest_class|HttpRequest]]</var> object.</td></tr>
</table>


</td></tr></table>
==Usage notes==
==Usage notes==
<ul>
<li>If <var>Success</var> returns 1 (True), content was retrieved and is available via the <var>[[Content (HttpResponse function)|Content]]</var> and <var>[[ParseXml (HttpResponse function)|ParseXml]]</var> methods.
</ul>


If <var>Success</var> returns 1 (True),
content was retrieved and is available via the <var>[[Content (HttpResponse function)|Content]]</var>
and <var>[[ParseXml (HttpResponse function)|ParseXml]]</var> methods.
==See also==
==See also==
{{Template:HttpResponse:Success footer}}
{{Template:HttpResponse:Success footer}}

Latest revision as of 19:02, 20 June 2011

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

The Success method lets you check the status code value in the status line of the result of the most recent Get, Post, or Send operation.

Syntax

%number = httpResponse:Success

Syntax terms

%number A numeric variable for the assignment of the Success value of httpResponse. Success returns 1 (True) if the HTTP status code is in the 200s (success range), and it returns 0 (False) otherwise.
httpResponse A reference to an HttpResponse object that was returned by a Get, Post, or Send method of an HttpRequest object.

Usage notes

  • If Success returns 1 (True), content was retrieved and is available via the Content and ParseXml methods.

See also