{ "ns" : "http://expath.org/ns/http-client", "description" : "
\n This module provides an implementation of the\n EXPath Http Client.\n It provides functions for making HTTP requests and is a superset of the\n module specified by EXPath.\n Specifically, it implements the http:send-request()
functions\n as specified by EXPath. Moreover, it adds an additional function\n http:read()
(with several arities for the sake of ease).\n
\n In general, both functions take a description of the HTTP request to make\n as parameter, execute the request, and return a representation of the HTTP\n response. For instance, in the following code snippet, we fetch the Zorba\n home page:\n
\nimport module namespace http = \"http://expath.org/ns/http-client\";\n http:send-request(\n <http:request href=\"http://zorba.io\" method=\"get\" />\n )\n\n
\n The http:send-request()
functions are declared as sequential.\n Sequential functions are allowed to have side effects. For example, most probably,\n an HTTP POST request is a request that has side effects because it adds/changes\n a remote resource. Sequential functions are specified in the\n XQuery Scripting Extension.\n In contrast, the http:read() functions are not declared as sequential -\n they are declared as nondeterministic though, which\n means that several calls may return different results.\n HTTP requests performed using these functions are not allowed to have\n side effects.\n
\n The response is returned as a sequence of one or more items. The first\n one is an http:response
element with quite the same\n structure as an http:request, but without the content itself.\n The content is returned as the second item (or several items in case of\n a multipart response) as a string, a document node, or a binary item.\n This depends on the content-type returned.\n Specifically, the rules are as follows:\n
\n The structure of a request element is defined in the schema that is imported\n by this module. The details are described in the\n specification.\n Analogously, the response element is also described in this\n specification.\n
\n", "sees" : [ "\n http:send-request($request, (), ())\n
\n", "summary" : "Function for convenience.
", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "request", "type" : "element(*)", "occurence" : null, "description" : "\n http:send-request($request, $href, ())\n
\n", "summary" : "Function for convenience.
", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "request", "type" : "element(*)", "occurence" : null, "description" : "\n This function is declared as sequential (see XQuery Scripting).\n Sequential functions are allowed to have side effects. For example, most probably,\n an HTTP POST request is a request that has side effects because it adds/changes\n a remote resource.\n
\n", "summary" : "This function sends an HTTP request and returns the corresponding response.
", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "request", "type" : "element(*)", "occurence" : null, "description" : "