Liking cljdoc? Tell your friends :D

fifql.client


*fif-clojure-value-escape*clj

source

formcljmacro

(form & body)

quoted form with escaped evaluation. Values preceding fif-clojure-value-escape are evaluated in clojure(script). Examples: ;; Assuming we want to pull a clojure value into a quoted form (def x 10) (form value %= x) ;; => '[form value 10] Notes:

  • *fif-clojure-value-escape can be replaced with a different escape symbol as desired.
quoted form with escaped evaluation. Values preceding
*fif-clojure-value-escape* are evaluated in clojure(script).
Examples:
;; Assuming we want to pull a clojure value into a quoted form
(def x 10)
(form value %= x) ;; => '[form value 10]
Notes:
- *fif-clojure-value-escape can be replaced with a different escape
symbol as desired.
sourceraw docstring

queryclj/s≠

clj
(query url sform)

Performs a POST request on the given url with the given fif form. Returns a map consisting of the :stack, :input-string, a vector of strings sent to stderr and a vector of strings sent to stdout.

Examples

(def x 10) (query {:url "http://localhost:8080/fifql" :sform (sform %= x 2 +)}) ;; {:input-string "10 2 +", :stack (12), :stdout [], :stderr []}

Performs a POST request on the given `url` with the given fif
`form`. Returns a map consisting of the `:stack`, `:input-string`, a
vector of strings sent to `stderr` and a vector of strings sent to
`stdout`.

# Examples
(def x 10)
(query {:url "http://localhost:8080/fifql"
        :sform (sform %= x 2 +)})
;; {:input-string "10 2 +", :stack (12), :stdout [], :stderr []}
cljs
(query url sform callback)

Performs a POST request on the given url with the given fif sform. Upon success will call the callback function with the result of the fif stack-machine.

Examples

(def x 10) (query "http://localhost:8080/fifql" (sform %= x 2 +) (fn [data] (println data))) ;; {:input-string "10 2 +", :stack (12), :stdout [], :stderr []}

Performs a POST request on the given `url` with the given fif
`sform`. Upon success will call the `callback` function with the
result of the fif stack-machine.

# Examples
(def x 10)
(query "http://localhost:8080/fifql"
       (sform %= x 2 +)
       (fn [data] (println data)))
;; {:input-string "10 2 +", :stack (12), :stdout [], :stderr []}
source (clj)source (cljs)raw docstring

sformcljmacro

(sform & body)

Equivlant to form, but presents the result as a string that can be consumed by a fifql stack-machine.

Notes

  • This should be used with the query function to construct the stack form.
Equivlant to `form`, but presents the result as a string that can
be consumed by a fifql stack-machine.

# Notes
 
- This should be used with the `query` function to construct the stack form.
sourceraw docstring

slurp-maybeclj

(slurp-maybe s)
source

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

× close