request.get_json() returns (Ellipsis, Ellipsis)
- Dominant language
- C#
- Stars
- 8k
- Forks
- 2.8k
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to follow [this](https://hackernoon.com/learn-blockchains-by-building-one-117428612f46) article on building a simple blockchain. But right now I'm stuck at step 3: "Interacting with our Blockchain"
I tried accessing the `http://localhost:5000/transactions/new` using cURL with the following commands:
`curl -X POST -H "Content-Type: application/json" -d '{"sender": "d4ee26eee15148ee92c6cd394edd974e", "recipient": "a4ee26eee15148ee92c6cd394edd974e", "amount": 5}' "http://localhost:5000/transactions/new"`
`curl --header "Content-Type: application/json" --request POST --data '{"sender": "f3ba8", "recipient": "b5d29", "amount": 5}' http://localhost:5000/transactions/new`
Both return "Missing values" and if i print out the `values` variable it says "(Ellipsis, Ellipsis)".
I already tried to use postman for the request, but still got the same error. I also tried to copy & paste the finished code from this repo to check if I made a mistake while following the steps in the article.
It seams to as if there is something wrong with my cURL command but i can't figure out what.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the POST request to /transactions/new with the curl commands shown, then inspect how request.get_json() is used at that endpoint. Compare the request body and Content-Type with the article and repository's finished code. Done means a valid JSON request produces the expected sender, recipient, and amount values instead of "Missing values".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100