Skip to content

Commit

Permalink
add document
Browse files Browse the repository at this point in the history
  • Loading branch information
Go Saito committed Dec 8, 2016
1 parent 5f5b401 commit 4ba2ca8
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,14 @@ Dexador singals a condition `http-request-failed` when the server returned 4xx o
(dex:get "http://lisp.org"))
```

### Proxy

You can connect via proxy.

```common-lisp
(dex:get "http://lisp.org/" :proxy "http://proxy.yourcompany.com:8080/")
```

## Functions

All functions take similar arguments.
Expand Down Expand Up @@ -224,14 +232,16 @@ All functions take similar arguments.
- The stream to write an HTTP request. This is the way to reuse a connection and commonly used with `:keep-alive T`.
- `verbose` (boolean)
- This option is for debugging. If this is `T`, it dumps the HTTP request headers.
- `proxy` (string)
- for use proxy.

### \[Function\] request

```common-lisp
(dex:request uri &key method version content headers basic-auth cookie-jar timeout
(keep-alive t) (use-connection-pool t) (max-redirects 5)
ssl-key-file ssl-cert-file ssl-key-password
stream verbose force-binary want-stream)
stream verbose force-binary want-stream proxy)
;=> body
; status
; response-headers
Expand All @@ -258,47 +268,47 @@ This function signals `http-request-failed` when the HTTP status code is 4xx or
```common-lisp
(dex:get uri &key version headers basic-auth cookie-jar keep-alive timeout max-redirects force-binary want-stream
ssl-key-file ssl-cert-file ssl-key-password
stream verbose)
stream verbose proxy)
```

### \[Function\] post

```common-lisp
(dex:post uri &key version headers content cookie-jar keep-alive timeout force-binary want-stream
ssl-key-file ssl-cert-file ssl-key-password
stream verbose)
stream verbose proxy)
```

### \[Function\] head

```common-lisp
(dex:head uri &key version headers cookie-jar timeout max-redirects
ssl-key-file ssl-cert-file ssl-key-password
stream verbose)
stream verbose proxy)
```

### \[Function\] put

```common-lisp
(dex:put uri &key version headers content cookie-jar keep-alive timeout force-binary want-stream
ssl-key-file ssl-cert-file ssl-key-password
stream verbose)
stream verbose proxy)
```

### \[Function\] delete

```common-lisp
(dex:delete uri &key version headers cookie-jar keep-alive timeout force-binary want-stream
ssl-key-file ssl-cert-file ssl-key-password
stream verbose)
stream verbose proxy)
```

### \[Function\] fetch

Send a GET request to `URI` and write the response body to the `DESTINATION`.

```common-lisp
(dex:fetch uri destination &key if-exists verbose)
(dex:fetch uri destination &key if-exists verbose proxy)
```

## Benchmark
Expand Down

0 comments on commit 4ba2ca8

Please sign in to comment.