We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44cd65f commit c8cdd5fCopy full SHA for c8cdd5f
src/clojure/http/client.clj
@@ -15,15 +15,13 @@ representation of text."
15
[text]
16
(URLEncoder/encode text "UTF-8"))
17
18
-(defn- encode-body-map
19
- "Turns a map into a URL-encoded string suitable for a request body."
+(defn- encode-body
+ "Turns a map into a URL-encoded string suitable for a request body,
20
+or just send it verbatim if it's a string."
21
[body]
- (str-join "&" (map #(str-join "=" (map url-encode %)) body)))
22
-
23
-(defn- encode-body [body]
24
(if (string? body)
25
body
26
- (encode-body-map body)))
+ (str-join "&" (map #(str-join "=" (map url-encode %)) body))))
27
28
(defn url
29
"If u is an instance of java.net.URL then returns it without
0 commit comments