Message (HttpResponse function): Difference between revisions
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
{{Template:HttpResponse:Message subtitle}} | |||
This non-settable method lets you check the HTTP | This non-settable method lets you check the HTTP | ||
Line 13: | Line 8: | ||
a <code>403</code> <code>Forbidden</code> status line). | a <code>403</code> <code>Forbidden</code> status line). | ||
==Syntax== | ==Syntax== | ||
{{Template:HttpResponse:Message syntax}} | |||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
Line 39: | Line 32: | ||
. . . | . . . | ||
</p> | </p> | ||
==See also== | |||
{{Template:HttpResponse:Message footer}} |
Revision as of 21:45, 17 June 2011
Return code message of most recent request (HttpResponse class)
This non-settable method lets you check the HTTP
status line (return code and message) of the
result of the most recent HTTP request.
The Message method returns only the message portion of the status line
(for example, Forbidden
is returned from
a 403
Forbidden
status line).
Syntax
%string = httpResponse:Message
Syntax terms
%message | A string or longstring variable for the assignment of the Message value of %httpresp. |
---|---|
%httpresp | A reference to an HTTPResponse object that was returned by a Get, Post, or Send method of an HTTPRequest object. |
Examples
In the following fragment, an XML document is being retrieved. In the event of an error, the text of the status message is printed:
. . . %httpresp = %httpreq:Get('HHELPCLI', 0) If (%httpresp:Success) then %rc = %httpresp:ParseXML(%mydoc) %mydoc:Print Else Print %httpresp:message End If . . .