Success (HttpResponse function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
<span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span>
{{Template:HttpResponse:Success subtitle}}
[[Category:HttpResponse methods|Success property]]


This non-settable method lets you check the status
This non-settable method lets you check the status
Line 6: Line 5:
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.
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==
<p class="syntax">%boolean = %httpresp:Success
{{Template:HttpResponse:Success syntax}}
</p>
 
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
Line 18: Line 15:


</td></tr></table>
</td></tr></table>
==Usage Notes==
==Usage notes==


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

Revision as of 21:59, 17 June 2011

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


This non-settable 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

%boolean 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.
%httpresp 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