Created
November 30, 2015 20:13
-
-
Save borkdude/ec80dddf2c5bc5b38f74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def r1 (pr/build (str "/users/" | |
(:id @atm_user) | |
"/profile/picture") | |
{:request-method :put | |
:params {"picture" (io/file (io/resource "nikita.jpg"))}} | |
nil nil nil)) | |
;; r1: | |
{:remote-addr "localhost", | |
:headers {"content-type" "multipart/form-data; boundary=_3sqmDS6uGzN5iAB_-7_899kHFhdR7vwemO", | |
"content-length" 218158, | |
"host" "localhost"}, | |
:server-port 80, | |
:content-length 218158, | |
:content-type "multipart/form-data; boundary=_3sqmDS6uGzN5iAB_-7_899kHFhdR7vwemO", | |
:uri "/users/owp5-6nz7-79yz-pb7t-76jn/profile/picture", | |
:server-name "localhost", | |
:query-string nil, | |
:body #object[java.io.BufferedInputStream 0x545a5423 "java.io.BufferedInputStream@545a5423"], | |
:scheme :http, | |
:request-method :put} | |
(def mp (peridot.multipart/build {"picture" (io/file (io/resource "nikita.jpg"))})) | |
(def r2 (pr/build (str "/users/" | |
(:id @atm_user) | |
"/profile/picture") | |
(merge {:request-method :put | |
} mp) | |
nil nil nil)) | |
;; r2: | |
{:remote-addr "localhost", | |
:headers {"host" "localhost", | |
"content-type" "multipart/form-data; boundary=ekGP_QoxWMYMMDtNS5xfCxrJK8e1If", | |
"content-length" "218148"}, | |
:server-port 80, | |
:content-length 218148, | |
:content-type "multipart/form-data; boundary=ekGP_QoxWMYMMDtNS5xfCxrJK8e1If", | |
:uri "/users/owp5-6nz7-79yz-pb7t-76jn/profile/picture", | |
:server-name "localhost", | |
:query-string nil, | |
:body #object[java.io.BufferedInputStream 0x4513ceb8 "java.io.BufferedInputStream@4513ceb8"], | |
:scheme :http, | |
:request-method :put} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment