Liking cljdoc? Tell your friends :D
ClojureScript only.

suluk.core


fetch!cljs

(fetch! r-type url & args)

Takes Request Type as Keyword, Process;

:get -> (fn [URL, & DATA, function-map]) |> URL: Get Request URL address. |> function-map: :param-f First ring on your call-back chain. It can be one of fn under suluk.response: res->text, res->blob, res->json :fail-f Catch function for your JS Promise. Default js/console.error :fns Vector of functions with (response -> response) function signature. Chain of call-backs.

:post -> (fn [URL, & DATA, function-map]) |> URL: Post Request URL address. |> DATA: Your Payload. |> function-map: :param-f First ring on your call-back chain. It can be one of fn under suluk.response: res->text, res->blob, res->json :fail-f Catch function for your JS Promise. Default js/console.error :fns Vector of functions with (response -> response) function signature. Chain of call-backs.

:post-json -> (fn [URL, & DATA, function-map]) |> URL: Post Request URL address. |> DATA: Your Payload. But, implicitly converted JSON with JSON/stringify. |> function-map: :param-f First ring on your call-back chain. It can be one of fn under suluk.response: res->text, res->blob, res->json :fail-f Catch function for your JS Promise. Default js/console.error :fns Vector of functions with (response -> response) function signature. Chain of call-backs.

Takes Request Type as Keyword,
Process;

:get -> (fn [URL, & DATA, function-map])
|> URL: Get Request URL address.
|> function-map:
     `:param-f` First ring on your call-back chain.
     It can be one of fn under `suluk.response`: `res->text`, `res->blob`, `res->json`
     `:fail-f` Catch function for your JS Promise. Default `js/console.error`
     `:fns` Vector of functions with (response -> response) function signature. Chain of call-backs.

:post -> (fn [URL, & DATA, function-map])
|> URL: Post Request URL address.
|> DATA: Your Payload.
|> function-map:
     `:param-f` First ring on your call-back chain.
     It can be one of fn under `suluk.response`: `res->text`, `res->blob`, `res->json`
     `:fail-f` Catch function for your JS Promise. Default `js/console.error`
     `:fns` Vector of functions with (response -> response) function signature. Chain of call-backs.

:post-json -> (fn [URL, & DATA, function-map])
|> URL: Post Request URL address.
|> DATA: Your Payload. But, implicitly converted JSON with JSON/stringify.
|> function-map:
     `:param-f` First ring on your call-back chain.
     It can be one of fn under `suluk.response`: `res->text`, `res->blob`, `res->json`
     `:fail-f` Catch function for your JS Promise. Default `js/console.error`
     `:fns` Vector of functions with (response -> response) function signature. Chain of call-backs.
sourceraw docstring

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

× close