diff --git a/README.md b/README.md index 911f4a9..da9bc69 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@ A minimal request library for and in zepto. Requires at least version 0.9.2. -Documentation can be generated with `zeps`. +Documentation can be generated with `zeps` or +found under `docs/index.html`. ## Installation diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..68603fd --- /dev/null +++ b/docs/index.html @@ -0,0 +1,509 @@ + + + + + + + + + + +
+

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

+
+
+ + +
+ + +