tech.v3.libs.cljs-ajax

Bindings to use the dataset handlers in cljs GET/POST calls.

add-java-time-handlers!

(add-java-time-handlers!)

Add handlers for java.time.LocalDate and java.time.Instant

add-transit-io-handlers!

(add-transit-io-handlers! datatype tag read-fn write-fn)

GET

(GET url options)

Drop in replacement for cljs-ajax.core/GET

opt-map

(opt-map)

Options map that must be included in the cljs-ajax request in order to activate dataset->transit pathways.

POST

(POST url options)

Drop in replacement for cljs-ajax.core/POST

read-handlers*

response-format

(response-format & [content-type])

cljs-ajax interceptor that hardwires content-type to application/transit+json and uses ds/transit-read-handler-map.

transit-request

(transit-request method url options)

Perform a cljs-ajax request using the select cljs-ajax.core method and merging opt-map first into the options.

write-handlers*

writer

(writer)

Transit writer used for writing transit-json datasets and uses ds/transit-write-handler-map