Liking cljdoc? Tell your friends :D

contextual.http


compile-requestclj

(compile-request {:keys [url path query-params body form method headers]})
(compile-request {:keys [url path query-params body form method headers]}
                 lookup)
(compile-request {:keys [url path query-params body form method headers]}
                 lookup
                 registry)
(compile-request {:keys [url path query-params body form method headers]}
                 lookup
                 registry
                 {:keys [serialize-query-params serialize-body serialize-form
                         form-serializer body-serializer]})

Compile request template to IContext tree which outputs a map of similar form. Takes:

  • request, a map of at least :url, which can also contain:
    • method: GET, POST, etc.
    • path: a vector of segments or a single string
    • query-params: a map or sequence of pairs
    • body: a map or sequence of pairs
    • form: a map or sequence of pairs
  • lookup: like contextual.core/compile
  • registry: like contextual.core/compile
  • options:
    • serialize-body & body-serializer: when the former is true and the latter is provided, will serialize body to a string (after evaluation) with the provided serializer
    • serialize-form & form-serializer: same as with body.
    • serialize-query-params: will serialize the query params at the end of the url if true.
Compile request template to `IContext` tree which outputs a map of
similar form.
Takes:
- `request`, a map of at least :url, which can also contain:
  - method: GET, POST, etc.
  - path: a vector of segments or a single string
  - query-params: a map or sequence of pairs
  - body: a map or sequence of pairs
  - form: a map or sequence of pairs
- `lookup`: like `contextual.core/compile`
- `registry`: like `contextual.core/compile`
- options:
  - serialize-body & body-serializer: when the former is true and the
    latter is provided, will serialize body to a string (after evaluation)
    with the provided serializer
  - serialize-form & form-serializer: same as with body.
  - serialize-query-params: will serialize the query params at the end of the url if true.
sourceraw docstring

http-symbols-registryclj

source

path->irclj

(path->ir path)
(path->ir path sep)
source

path-sepclj

source

qs->irclj

(qs->ir m)
source

requestclj

(request {:keys [url path query-params body form method headers]
          :or {method "GET"}}
         {:keys [serialize-query-params serialize-body serialize-form]})
source

scalar?clj

source

url-encodeclj

(url-encode s)
source

url-sepclj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close