Set 'Accept: application/json' for the TestApp.*_json requests?
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Start by locating the TestApp.*_json() entry points and their existing Content-Type handling, then inspect the related functional tests. Done means the JSON request methods also send an Accept: application/json header and the tests verify that behavior.
Written by the indexing model from the issue text.
Description
I'm working on a Pyramid app, which exposes a json rest api.
In the functional tests, I'm using WebTest and its TestApp.*_json() methods to send json requests.
The app looks at (among other things) the Accept header, to know what to send back to the client.
The various TestApp.*_json() methods already set the Content-Type header to application/json, to tell the server that what is sent is json.
It seems to me that they should also set the Accept header to tell the server that the answer they expect should be json.
Does that make sense?
I'd be happy to send a pull request if you agree to this change.
- Dominant language
- Python
- Stars
- 346
- Forks
- 113
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
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.
More from Pylons/webtest
-
Attempt at double decoding of PATH_INFO when using Django and CookieJarPossibly taken @gyanu2507 claimed this 42 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
Inline type hintsOpen
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
KalicoCrew/kalico#1012 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
esphome/esphome.io#7657 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
VNG-Realisatie/gemma-zaken#2658 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
comp/gateway comp/plugins duplicate P3 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NousResearch/hermes-agent#137019 ·
Maintainers usually reply within 1 day