Http.post not accepting content type application/query+json.
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 1.1k
- Forks
- 419
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 8
Description
I am using flutter application to talk with azure cosmos db. cosmos db has a sql query based rest api. Where the content type should be application/query+json.
I tried connecting to cosmos db using postman it worked but in flutter i am getting an exception as
~~~
Bad state: Cannot set the body fields of a Request with content-type "application/query+json"
~~~
So my question is does the package support content type application/query+json for the body. If yes how should i formulate my request body. My example http.post query is as below.
~~~
{
"query" : "",
"parameters" : []
}
~~~
Contributor 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.
Research direction
Start by reproducing the Http.post request with content type application/query+json and the sample Cosmos DB query body, then inspect how the package handles body fields for non-form content types. Confirm the expected request behavior against the working Postman example; done means the supported behavior or required request formulation is documented and covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100