A custom middleware stack to make Shopify API requests with clj-http.
A custom middleware stack to make Shopify API requests with clj-http.
(params->query-string data & [prefix])
Builds Rails-style nested query strings from param maps.
Builds Rails-style nested query strings from param maps.
(wrap-auth client)
If :access-token
is present in the request, converts it into the appropriate auth header. Otherwise it looks for :api-key
and :password
to use basic auth.
If `:access-token` is present in the request, converts it into the appropriate auth header. Otherwise it looks for `:api-key` and `:password` to use basic auth.
(wrap-generic-params-key client)
Middleware which renames :params
to :query-params
when method is GET, HEAD, or DELETE. For other methods, :params
becomes :form-params
.
Middleware which renames `:params` to `:query-params` when method is GET, HEAD, or DELETE. For other methods, `:params` becomes `:form-params`.
(wrap-json-format client)
Middleware which forces JSON for everything, and appends .json
to paths if it isn't already there.
Middleware which forces JSON for everything, and appends `.json` to paths if it isn't already there.
(wrap-query-params client)
Middleware which converts a :query-params
map into a Rails-style nested :query-string
.
Middleware which converts a `:query-params` map into a Rails-style nested `:query-string`.
(wrap-remove-namespaced-keys-from-request-params client)
(wrap-request request)
Wraps a request function with an appropriate stack of middleware.
Wraps a request function with an appropriate stack of middleware.
(wrap-retry-on-throttle-errors client)
Middleware which retries a request if it's being throttled.
Request options:
:retry-on-throttle-errors
: whether to retry throttled requests (default true
):throttle-retry-delay
: how many seconds to wait between throttle retries (default 60
):max-throttle-retries
: how many times to retry before giving up and returning the error response (default 12
)In the response:
:throttle-retry-count
: number of retries (key is absent when there were no retries)Middleware which retries a request if it's being throttled. Request options: * `:retry-on-throttle-errors`: whether to retry throttled requests (default `true`) * `:throttle-retry-delay`: how many seconds to wait between throttle retries (default `60`) * `:max-throttle-retries`: how many times to retry before giving up and returning the error response (default `12`) In the response: * `:throttle-retry-count`: number of retries (key is absent when there were no retries)
(wrap-shop client)
Middleware converting a :shop
option into :server-name
.
Middleware converting a `:shop` option into `:server-name`.
(wrap-ssl client)
Middleware defaulting requests to SSL.
Middleware defaulting requests to SSL.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close