Skip to content

Commit

Permalink
added a test for the progress-handler
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanBertrand authored and JulianBirch committed Jul 17, 2017
1 parent 6bd1b29 commit b5bec9b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions browser-test/browser.cljc
Expand Up @@ -179,6 +179,20 @@
:api (js/XMLHttpRequest.)
:handler blob-response-handler
:error-handler handle-error
:response-format {:content-type "image/png"
:type :blob
:description "PNG file"
:read -body}}))

#? (:cljs (ajax-request {:uri "/ajax-form-data-png"
:method "POST"
:body (doto
(js/FormData.)
(.append "id" "19")
(.append "timeout" "0")
(.append "input" "Hello form-data POST"))
:handler blob-response-handler
:error-handler handle-error
:progress-handler handle-progress
:response-format {:content-type "image/png"
:type :blob
Expand Down

0 comments on commit b5bec9b

Please sign in to comment.