Message (HttpResponse function)
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 . . .