URL (HttpResponse function)

From m204wiki
Revision as of 19:21, 17 June 2011 by 198.242.244.47 (talk) (Created page with " <span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span> Url property <p> <var>Url</var> is a member of the <var>[[Ht...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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