Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
HTTP client
The
http.client
vocabulary implements an HTTP and HTTPS client on top of
HTTP protocol objects
.
For HTTPS support, you must load the
io.sockets.secure
vocab first. If you don't need HTTPS support, don't load
io.sockets.secure
; this will reduce the size of images generated by
tools.deploy
.
There are two primary usage patterns, data retrieval with GET requests and form submission with POST requests:
GET requests with the HTTP client
POST requests with the HTTP client
PUT requests with the HTTP client
Submission data for POST and PUT requests:
HTTP client post data
Other HTTP methods are also supported:
HEAD requests with the HTTP client
DELETE requests with the HTTP client
OPTIONS requests with the HTTP client
TRACE requests with the HTTP client
More esoteric use-cases, for example HTTP methods other than the above, are accommodated by constructing an empty request object with
<request>
and filling everything in by hand.
Character encodings and the HTTP client
HTTP client errors
See also
URL objects