Code (HttpResponse function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
Line 1: Line 1:
<span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span>
{{Template:HttpResponse:Code subtitle}}
[[Category:HttpResponse methods|Code property]]
<p>
<var>Code</var> is a member of the <var>[[HttpResponse class|HttpResponse]]</var> class.
</p>


This method lets you check the HTTP status
This method lets you check the HTTP status
Line 10: Line 6:
Code returns only the code portion of the status line (for example, "200").
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">
Line 22: Line 16:


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

Revision as of 21:22, 17 June 2011

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


This 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

%string = httpResponse:Code

Syntax terms

%code A string, longstring, or numeric variable for the assignment of the current Code value of %httpresp.
%httpresp A reference to an HTTPResponse object that was returned by a Get, Post, or Send method of an HTTPRequest object.

See also