Namespace: joker.http
v1.0Contents
Summary
Provides HTTP client and server implementations.
Index
Legend
-
Constant
Variable
Function
Macro
Special form
Type
GoVar
Receiver/Method
Constants
Constants are variables with :const true in their metadata. Joker currently does not recognize them as special; as such, it allows redefining them or their values.-
(None.)
Variables
-
(None.)
Functions, Macros, and Special Forms
-
send
Function v1.0(send request)
Sends an HTTP request and returns an HTTP response.
request is a map with the following keys:
- url (string)
- method (string, keyword or symbol, defaults to :get)
- body (string)
- host (string, overrides Host header if provided)
- headers (map).
All keys except for url are optional.
response is a map with the following keys:
- status (int)
- body (string)
- headers (map)
- content-length (int) -
start-file-server
Function v1.0(start-file-server addr root)
Starts HTTP server on the TCP network address addr that
serves HTTP requests with the contents of the file system rooted at root. -
start-server
Function v1.0(start-server addr handler)
Starts HTTP server on the TCP network address addr.
Types
-
(None.)