(first-id resp)
Given a response from the Cloud API, this function returns the id of the first record.
Given a response from the Cloud API, this function returns the id of the first record.
(full-url endpoint session)
Creates a full url using the non-hostnamed endpoint and the current session to determine a fully qualified URI that can be used for REST requests..
Creates a full url using the non-hostnamed endpoint and the current session to determine a fully qualified URI that can be used for REST requests..
(gzip-compress content)
Takes string content, gzips it, and returns it as a Java InputStream.
Takes string content, gzips it, and returns it as a Java InputStream.
(gzip-request-content request)
If the request contains a body and it's not explicitly setting :gzip? to false, then the body will get gzip'ed and the Content-Encoding set.
If the request contains a body and it's not explicitly setting :gzip? to false, then the body will get gzip'ed and the Content-Encoding set.
(include-accept-encoding request)
(include-auth request session)
Takes a request and a session and adds the JWT auth token iff the session is logged in and the request isn't explicitly excluding auth.
Takes a request and a session and adds the JWT auth token iff the session is logged in and the request isn't explicitly excluding auth.
(include-json request)
Takes a http request and converts the body into JSON with the appropriate
content type if the json?
key has a truthy value or if the body is a
collection.
Takes a http request and converts the body into JSON with the appropriate content type if the `json?` key has a truthy value or if the body is a collection.
(include-rollback req {:keys [rollback?]})
Takes a http request and a session and adds the rollback query parameter if the :rollback? key is set in the session
Takes a http request and a session and adds the rollback query parameter if the :rollback? key is set in the session
(make-cloud-response {:keys [body error status] :as resp})
Parses the cloud response to ensure that it's valid, then extracts the parsed JSON body and attaches the HTTP response to it as metadata.
Parses the cloud response to ensure that it's valid, then extracts the parsed JSON body and attaches the HTTP response to it as metadata.
(make-sni-client)
Creates a HTTP-Kit client using a special SSL engine to handle SNI.
Creates a HTTP-Kit client using a special SSL engine to handle SNI.
(prepare-request session req)
(process-json response)
Takes a ring response and checks to see if it contains a JSON string that can be parsed and parses it if it does.
Takes a ring response and checks to see if it contains a JSON string that can be parsed and parses it if it does.
(request session raw-req)
(sni-configure ssl-engine uri)
Configures HTTP-Kit's SSL engine to handle SNI (Server Name Indication).
Configures HTTP-Kit's SSL engine to handle SNI (Server Name Indication).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close