idris2-http icon indicating copy to clipboard operation
idris2-http copied to clipboard

Failed to make an HTTP request

Open notooth1 opened this issue 7 months ago • 0 comments

I made an HTTP request and got an error. Can anyone help? My code:

blockNumber : EitherT String IO ()
blockNumber = map_error show $ with_client {e=()} new_client_default $ \client => do
  let header : List (String, String) = [("Content-Type", "application/json")]
      body : String = "{\"id\":1, \"jsonrpc\":\"2.0\", \"method\":\"eth_blockNumber\", \"params\":[]}"
  (response, content) <- request client POST (url' "https://sepolia.gateway.tenderly.co") header body
  content <- toList_ content
  printLn $ utf8_pack $ content

Return:

Just "{\"error\":{\"slug\":\"route_not_found\",\"message\":\"Requested route not found\"}}"

notooth1 avatar May 25 '25 04:05 notooth1