Skip to content

Conversation

jsvisa
Copy link
Contributor

@jsvisa jsvisa commented Oct 26, 2023

Fix an issue of wrong Content-Type

$ curl -XPOST 127.0.0.1:8545/graphql -d '{"query": "{block(number: 1  hash: \"0xc1d1224983a2b43f2ea1b847337eda55e316e94603386e346abe3f6e08121027\") {number hash }}"}' -v
Note: Unnecessary use of -X or --request, POST is already inferred.
* Connected to 127.0.0.1 (127.0.0.1) port 8545 (#0)
> POST /graphql HTTP/1.1
> Host: 127.0.0.1:8545
> User-Agent: curl/8.1.2
> Accept: */*
> Content-Length: 124
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 400 Bad Request
< Date: Thu, 26 Oct 2023 00:29:18 GMT
< Content-Length: 110
< Content-Type: text/plain; charset=utf-8
<
* Connection #0 to host 127.0.0.1 left intact
{"errors":[{"message":"only one of number or hash must be specified","path":["block"]}],"data":{"block":null}}

@s1na PTAL

@jsvisa jsvisa requested a review from s1na as a code owner October 26, 2023 00:35
@fjl fjl merged commit 2d7dba0 into ethereum:master Oct 27, 2023
@fjl fjl added this to the 1.13.5 milestone Oct 27, 2023
@jsvisa jsvisa deleted the graphql-content-type branch October 27, 2023 22:33
devopsbo3 pushed a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
Dergarcon pushed a commit to specialmechanisms/mev-geth-0x2mev that referenced this pull request Jan 31, 2024
colinlyguo pushed a commit to scroll-tech/go-ethereum that referenced this pull request Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants