URL (HttpResponse function)

From m204wiki
Jump to navigation Jump to search

<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