Liking cljdoc? Tell your friends :D

ajax.interceptors

This file contains the standard interceptors used by cljs-ajax to implement most of the 'magic'. There are four of them:

  • ProcessGet, which handles the fact that GETs do not have bodies and so need treating separately.
  • ApplyRequestFormat, which takes the request format key and applies it to the params key.
  • ResponseFormat, which is a parameterised interceptor dynamically added to the interceptor list. Note that the response format routines return one of these.
  • DirectSubmission, which spots that you're using a type that doesn't need format processing and sends it immediately.

There are no functions forming part of the public API in this file, so unless you're working on, studying or debugging cljs-ajax, you're probably in the wrong place.

This file contains the standard interceptors used by cljs-ajax to implement
most of the 'magic'. There are four of them: 
  
  * ProcessGet, which handles the fact that GETs do not have bodies and so need treating separately.
  * ApplyRequestFormat, which takes the request format key and applies it to the params key.
  * ResponseFormat, which is a parameterised interceptor dynamically added to the interceptor list. Note that the response format routines return one of these.
  * DirectSubmission, which spots that you're using a type that doesn't need format processing and sends it immediately.

There are no functions forming part of the public API in this file, so
unless you're working on, studying or debugging cljs-ajax, you're 
probably in the wrong place.
raw docstring

apply-request-formatclj/s

(apply-request-format write params)
source

ApplyRequestFormatclj/s

source

content-type-to-request-headerclj/s

(content-type-to-request-header content-type)
source

DirectSubmissionclj/s

source

exception-messageclj/s

(exception-message e)
source (clj)source (cljs)

failclj/s

(fail status status-text failure & params)
source

get-request-formatclj/s

(get-request-format format)

Internal function. Takes whatever was provided as :request-format and converts it to a true request format. In practice, this just means it will interpret functions as formats and not change maps. Note that it throws an exception when passed a keyword, because they should already have been transformed to maps.

Internal function. Takes whatever was provided as :request-format and 
converts it to a true request format. In practice, this just means it will 
interpret functions as formats and not change maps. Note that it throws an
exception when passed a keyword, because they should already have been 
transformed to maps.
sourceraw docstring

get-response-formatclj/s

(get-response-format interpret-vector {:keys [response-format] :as opts})
source

is-response-format?clj/s

(is-response-format? response-format)
source

ProcessUrlParametersclj/s

source

request-interceptorsclj/s

source

ResponseFormatclj/s

source

StandardInterceptorclj/s

source

to-interceptorclj/s

(to-interceptor m)

Utility function. If you want to create your own interceptor quickly, this will do the job. Note you don't need to specify both methods. (Or indeed either, but it won't do much under those circumstances.)

Utility function. If you want to create your own interceptor
quickly, this will do the job. Note you don't need to specify
both methods. (Or indeed either, but it won't do much under
those circumstances.)
sourceraw docstring

uri-with-paramsclj/s

(uri-with-params {:keys [vec-strategy params method url-params]} uri)

Internal function. Takes a uri and appends the interpretation of the query string to it matching the behaviour of url-request-format.

Internal function. Takes a uri and appends the interpretation of the query string to it
matching the behaviour of `url-request-format`.
sourceraw docstring

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

× close