You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{:error,{:invalid_json,%Jason.DecodeError{data: "<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n<hr><center>openresty</center>\r\n</body>\r\n</html>\r\n",position: 0,token: nil}}}
for whatever request I make, using the HTTPClient provided. I'm using a blockdaemon node.
I cloned the repo and added a IO.inspect after the httppoison request:
{:ok,%HTTPoison.Response{body: "<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n<hr><center>openresty</center>\r\n</body>\r\n</html>\r\n",headers: [{"Date","Tue, 09 Nov 2021 00:10:54 GMT"},{"Content-Type","text/html"},{"Content-Length","154"},{"Connection","close"},{"Server","nginx"}],request: %HTTPoison.Request{body: "{\"id\":1,\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x0\",false]}",headers: [{"Content-Type","application/json"}],method: :post,options: [],params: %{},url: "https://ethshared.bdnodes.net?auth={{KEY}}"},request_url: "https://ethshared.bdnodes.net?auth={{KEY}}",status_code: 400}}
I suspect this may be a problem with HTTPoison but couldn't figure out why. I wrote a BaseClient implementation that's almost the same as HttpClient, but uses Tesla instead, and it works, so the problem is probably not my node.
Hi! Thanks for the great work.
Running
ethereum
0.7.1,httppoison
1.8.0I keep getting this error
for whatever request I make, using the HTTPClient provided. I'm using a blockdaemon node.
I cloned the repo and added a
IO.inspect
after thehttppoison
request:I suspect this may be a problem with HTTPoison but couldn't figure out why. I wrote a
BaseClient
implementation that's almost the same asHttpClient
, but usesTesla
instead, and it works, so the problem is probably not my node.I'm quite happy with the custom impl, but perhaps other people are having the same problems as me, and we could try to solve it.
The text was updated successfully, but these errors were encountered: