Difference between revisions of "HTTP Client Module"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | + | This module contains an [[Querying#Functions|XQuery Function]] to send HTTP requests and handle HTTP responses. The function <code>send-request</code>, which is introduced with the <code>http:</code> prefix, is linked to the <code>http://expath.org/ns/http-client</code> namespace and based on the [http://expath.org/spec/http-client EXPath HTTP Client Module]: | |
==http:send-request== | ==http:send-request== |
Revision as of 18:36, 27 February 2011
This module contains an XQuery Function to send HTTP requests and handle HTTP responses. The function send-request
, which is introduced with the http:
prefix, is linked to the http://expath.org/ns/http-client
namespace and based on the EXPath HTTP Client Module:
http:send-request
Signatures | http:send-request($request as element(http:request)) as item()+ http:send-request($request as element(http:request)?, $href as xs:string?) as item()+ |
Summary | Sends an HTTP request and interprets the corresponding response. |
Rules | $request contains the parameters of the HTTP request like HTTP method and headers. In addition to this it can also contain the URI to which the request will be sent and the body of the HTTP method. If the URI is not given with the parameter $href , its value in $request is used instead. The structures of http:request , http:header and http:body elements follow the EXPath specification.
The attribute |