This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-25
Channels
- # aleph (1)
- # announcements (6)
- # babashka (13)
- # beginners (21)
- # clj-http (25)
- # clj-kondo (23)
- # clojure (17)
- # clojure-europe (49)
- # clojure-nl (1)
- # clojure-norway (8)
- # clojure-uk (4)
- # clojuredesign-podcast (15)
- # clojurescript (6)
- # cursive (18)
- # datomic (22)
- # emacs (29)
- # hyperfiddle (55)
- # introduce-yourself (4)
- # polylith (34)
- # portal (10)
- # releases (1)
- # shadow-cljs (16)
- # spacemacs (2)
hi I am trying to make a get request like the following in clj-http.
?input=%2B16502530000
&inputtype=phonenumber
When I use cUrl, it works well like below
curl -L -X GET ''
But I am not going through with my code using clj-http.
(client/get
"" ;; removed slash at the end
{:query-params
{:input "%2B16502530000"
:inputtype "phonenumber"}})
Can someone enlighten me what I am doing wrong?yes I just tried without the slash. It reaches and gets 200 but google map says my query is invalid.
Have you tried
(client/get
"" ;; removed slash at the end
{:query-params
{"input" "%2B16502530000"
"inputtype" "phonenumber"}})
Don't be. It's a headache. But I just did put all params in the url string like curl
(client/get
"")
and it works!
I know it looks primitive but it's important that it works. 🙂Maybe try this:
;; save the request that was sent in a :request key in the response:
(client/get "" {:save-request? true})
the library was changing the input value like this
%252B16502530000
what I meant was
%2B16502530000
I am getting these data successfully
;; :body
;; "{\n \"candidates\" : \n [\n {\n \"place_id\" : \"ChIJj61dQgK6j4AR4GeTYWZsKWw\"\n },\n {\n \"place_id\" : \"ChIJ2Xz75-t5j4ARB2DdjJy2uqA\"\n },\n {\n \"place_id\" : \"ChIJC_TKnI84K4gR7PNbCsldD0c\"\n },\n {\n \"place_id\" : \"ChIJyesLCqa3j4ARxZkBe9Qt_mk\"\n },\n {\n \"place_id\" : \"ChIJhbgMV7dhK4gR33wqaPHOCuQ\"\n },\n {\n \"place_id\" :
Thanks so much for your help @U4C3ZU6KX