This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-12
Channels
- # aleph (8)
- # announcements (9)
- # babashka (15)
- # beginners (91)
- # calva (54)
- # chlorine-clover (3)
- # cider (25)
- # clj-kondo (9)
- # cljfx (4)
- # cljsrn (12)
- # clojure (40)
- # clojure-australia (2)
- # clojure-europe (77)
- # clojure-nl (10)
- # clojure-spec (22)
- # clojure-uk (9)
- # clojurescript (39)
- # conjure (12)
- # cursive (8)
- # datascript (17)
- # datomic (22)
- # emacs (2)
- # expound (6)
- # fulcro (25)
- # kaocha (7)
- # malli (9)
- # meander (5)
- # off-topic (13)
- # pathom (8)
- # pedestal (5)
- # portal (1)
- # rdf (58)
- # re-frame (65)
- # reagent (15)
- # sci (3)
- # shadow-cljs (50)
- # test-check (6)
- # testing (3)
- # tools-deps (1)
- # vim (7)
- # xtdb (10)
Anyone know why I might be getting 400 errors with aleph's http client, when clj-http gives a 200 response for the same request? It's just a basic get request with no params
Could be anything I guess, missing query params, authentication. Can you share the request map?
Just a basic get on a public endpoint with no params
;;clj-http works as expected:
(clj-http/get ""
{:debug true
:debug-body? true
:as :json})
@(aleph-http/get ""
{:debug true
:debug-body? true
:as :json})
;;=>
{:aleph/keep-alive? true,
:aleph/complete #object[manifold.deferred.SuccessDeferred
"0x7397ac1"
{:status :ready, :val false}],
:headers {"server" "cloudflare",
"content-type" "application/json; charset=utf-8",
"content-length" "44",
"connection" "keep-alive",
"cf-request-id" "05bf7ff214000091da2324c200000001",
"set-cookie" "__cfduid=d66496ec04481eff43488e02e22fcad141602524469; expires=Wed, 11-Nov-20 17:41:09 GMT; path=/; domain=.; HttpOnly; SameSite=Lax; Secure",
"expect-ct" "max-age=604800, report-uri=\"\"",
"cf-cache-status" "EXPIRED",
"cf-ray" "5e129c302f8691da-EWR",
"date" "Mon, 12 Oct 2020 17:41:09 GMT"},
:status 400,
:body #object[java.io.ByteArrayInputStream
"0x5d066dd"
"java.io.ByteArrayInputStream@5d066dd"]}{:aleph/keep-alive? true,
:aleph/complete #object[manifold.deferred.SuccessDeferred
"0x7397ac1"
{:status :ready, :val false}],
:headers {"server" "cloudflare",
"content-type" "application/json; charset=utf-8",
"content-length" "44",
"connection" "keep-alive",
"cf-request-id" "05bf7ff214000091da2324c200000001",
"set-cookie" "__cfduid=d66496ec04481eff43488e02e22fcad141602524469; expires=Wed, 11-Nov-20 17:41:09 GMT; path=/; domain=.; HttpOnly; SameSite=Lax; Secure",
"expect-ct" "max-age=604800, report-uri=\"\"",
"cf-cache-status" "EXPIRED",
"cf-ray" "5e129c302f8691da-EWR",
"date" "Mon, 12 Oct 2020 17:41:09 GMT"},
:status 400,
:body #object[java.io.ByteArrayInputStream
"0x5d066dd"
"java.io.ByteArrayInputStream@5d066dd"]}
i suspect probably not ssl config, since you are getting an http 400 back. what's in that :body ByteArrayInputStream
? there might a useful error description in there...