Skip to content

Failed to make an HTTP request #16

@notooth1

Description

@notooth1

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\"}}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions