POST parameters are not decoded properly
Open
Nobody has claimed this yet.
bug
good first issue
- Dominant language
- Lua
- Stars
- 81
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
I'm using req.param() to extract POST request params, but it's not working at all.
Here's what I do:
echo '{"text": "Hello **world**!"}' | curl -d @- http://localhost:8080/
Then in tarantool I print the request as follows:
print(yaml.encode(req:param()))
Then I get this:
---
'{"text": "Hello **world**!"}':
...
If I try to get the "text" parameter using req:param("text"), it returns nil
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the req:param() implementation and reproduce the request with the curl command shown in the issue. Trace how the POST body is parsed and verify the behavior with both req:param() and req:param("text"); done means the JSON object's text value is accessible as the text parameter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100