This schema defines the type used by the XQuery http module
http://www.expath.org/mod/http-client.
This type defines a request. An element of this type can be used to make
an http request with the XQuery module
http://www.expath.org/mod/http-client.
Several http headers can be defined inside a http request.
The user has the choice to create either a multipart request or a
normal request (postRequest).
Represents a multi-part body, either in a request or a response,
as defined below.
Represents a multi-part body, either in a request or a response,
as defined below. It can be overridden by the parameter $content
(the way $content is used to build the body can be controlled by
the parameter $serial, see section below for details.)
Is the http verb to use, as GET, POST, etc. It is case insensitive.
Is the URI the request has to be sent to. It can be overridden by the
parameter $href.
Control how the response will look like; if true, only the
status code and the headers are returned, the content is not (neither
http:body, http:multipart, nor the interpreted additional value in
the returned sequence, see hereafter.)
HTTP authentication when sending a request is controlled by the
attributes username, password, auth-method and send-authorization
on the element http:request. If username has a value, password and
auth-method must have a value too. And if any one of the three other
attributes have been set, username must be set too.
HTTP authentication when sending a request is controlled by the
attributes username, password, auth-method and send-authorization
on the element http:request. If username has a value, password and
auth-method must have a value too. And if any one of the three other
attributes have been set, username must be set too.
HTTP authentication when sending a request is controlled by the
attributes username, password, auth-method and send-authorization
on the element http:request. If username has a value, password and
auth-method must have a value too. And if any one of the three other
attributes have been set, username must be set too.
HTTP authentication when sending a request is controlled by the
attributes username, password, auth-method and send-authorization
on the element http:request. If username has a value, password and
auth-method must have a value too. And if any one of the three other
attributes have been set, username must be set too.
Is a MIME type. It can be used only with http:request, and will
override the Content-Type header returned by the server.
Control whether an http redirect is automatically followed or not. If
it is false, the http redirect is returned as the response. If it is
true (the default) the function tries to follow the redirect, by
sending the same request to the new address (including body, headers,
and authentication credentials.) Maximum one redirect is followed
(there is no attempt to follow a redirect in response to following a
first redirect.)
Is the maximum number of seconds to wait for the server to respond. If
this time duration is reached, an error is thrown.
An element to be used to make an http request with the
http://www.expath.org/mod/http-client module.
This type represents a key value pair of a header element.
The key of the key/value pair.
The value of the key/value pair.
The http:body element represents the body of either an HTTP request or
of an HTTP response (in multi-part requests and responses, it represents
the body of a single one part.)
The http:multipart element represents an multi-part request or
response. The content-type attribute is the media type of the
request or response, and has to be a multipart media type (that is, its
main type must be multipart.) The boundary attribute is the boundary
marker used to separate the several parts in the message (the value of
the attribute is prefixed with "--" to form the actual boundary marker
in the request; on the other way, this prefix is removed from the
boundary marker in the response to set the value of the attribute.)
This is the first item returned by the function defined in this module.
The status attribute is the http status code returned by the server, and
message is the message coming with the status on the status line. The
http:header elements are as defined for the request, but represent
instead the response headers. The http:body and http:multipart elements
are also like in the request, but http:body elements must be empty.