Merge pull request #251 from kapware/patch-1

Added :response-format, without that it fails.
This commit is contained in:
Shaun Mahood 2016-10-13 10:43:10 -06:00 committed by GitHub
commit 846a30e3f5
1 changed files with 2 additions and 0 deletions

View File

@ -117,6 +117,7 @@ Here's our rewrite:
```clj
(ns my.app.events
(:require
[ajax.core :as ajax]
[day8.re-frame.http-fx]
[re-frame.core :refer [reg-event-fx]))
@ -128,6 +129,7 @@ Here's our rewrite:
;; we return a map of (side) effects
{:http-xhrio {:method :get
:uri "http://json.my-endpoint.com/blah"
:response-format (ajax/json-response-format {:keywords? true})
:on-success [:process-response]
:on-failure [:bad-response]}
:db (assoc db :loading? true)}))