request

The documentation of the request package.

request

(request:delete path opts)

lambda

Parameters:

path: No documentation

opts: No documentation

Complexity: N.A.

Returns: N.A.

(request:get path opts)

lambda

Parameters:

path: No documentation

opts: No documentation

Complexity: N.A.

Returns: N.A.

(request:head path opts)

lambda

Parameters:

path: No documentation

opts: No documentation

Complexity: N.A.

Returns: N.A.

(request:post path opts)

lambda

Parameters:

path: No documentation

opts: No documentation

Complexity: N.A.

Returns: N.A.

(request:put path opts)

lambda

Parameters:

path: No documentation

opts: No documentation

Complexity: N.A.

Returns: N.A.

(request:request path scheme opts)

performs a request to path (scheme is a string denoting the method). Options are given as the optional argument opts.

Parameters:

path: the resource to access

scheme: the method type (e.g. "PUT" or "DELETE")

opts: the options (accepted keys are :headers and :body)

Complexity: O(1) (heavily dependent on the network and request/response)

Returns: a hashmap with the keys :headers, :body, :status, and :request

(request:set-buffer-size! nsize)

sets the buffer size of the socket buffer.

Parameters:

nsize: an integer denoting the size

Complexity: O(1)

Returns: the new value

(request:set-default-headers! headers)

sets the default headers (normally only the user agent is set).

Parameters:

headers: a hashmap mapping header names to values

Complexity: O(1)

Returns: the new value

(request:set-follow-redirects! flag)

sets the flag whether the library should follow redirects.

Parameters:

flag: the boolean

Complexity: O(1)

Returns: the new value