URL (HttpResponse function): Difference between revisions
Jump to navigation
Jump to search
m (match syntax table to syntax template; edits, tags and links) |
m (→Syntax terms) |
||
Line 10: | Line 10: | ||
</td></tr> | </td></tr> | ||
<tr><th>httpResponse</th> | <tr><th>httpResponse</th> | ||
<td>A reference to an <var>[[HttpResponse_class|HttpResponse]]</var> object that was returned by a <var>[[Get_(HttpRequest_function)|Get]]</var>, <var>[[Post_(HttpRequest_function)| | <td>A reference to an <var>[[HttpResponse_class|HttpResponse]]</var> 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 <var>[[HttpRequest_class|HttpRequest]]</var> object.</td></tr> | ||
</table> | </table> | ||
Revision as of 18:58, 20 June 2011
URL from which the response was obtained (HttpResponse class)
The URL 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 = httpResponse:URL
Syntax terms
%string | A string variable for the assignment of the Url property value of %httpresp. |
---|---|
httpResponse | 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