URL (HttpResponse function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
Line 20: Line 20:
</td></tr>
</td></tr>
<tr><th>%httpresp</th>
<tr><th>%httpresp</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 HTTPResponse object that was returned by a <var>[[Get (HttpRequest function)|Get]]</var>, <var>[[Post (HttpRequest function)|Post]]</var>, or <var>[[Send (HttpRequest function)|Send]]</var> method of an HTTPRequest object.


</td></tr></table>
</td></tr></table>

Revision as of 22:00, 17 June 2011

<section begin=dpl_desc/><section end=dpl_desc/>

Url is a member of the HttpResponse class.

This non-settable method returns the actual URL from which a response was obtained. In the case of server redirects, the URL returned by this method will not be the URL requested on the HTTPRequest object.

Syntax

%string = %httpresp:Url

Syntax terms

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

Usage Notes

The URL method can inform an application that a redirection happened and what the real location of the requested item was. For example:

%HTTPResponse = %HTTPRequest:Get('XMLCLIENT') if (%HTTPResponse:URL ne %HTTPRequest:URL) then print 'Hey Moe, we got redirected to ' and - %HTTPResponse:URL end if