GraphQL Request Sampler sets incorrect Content-Type header of text/plain
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 5
Description
**Przemek Wesołek** ([Bug 65646](https://bz.apache.org/bugzilla//show_bug.cgi?id=65646&redirect=false)):
JSON requests send by GraphQL sampler contain wrong Content-Type header:
Content-Type: text/plain
which instead should be
Content-Type: application/json
by default.
One can of course use HTTP Header Manager to set the correct value for all requests, but I think this is only a workaround, as:
* the default should not be invalid (text/plain Content-Type is invalid for conforming GraphQL server),
* when mixing GraphQL queries with "standard" HTTP Requests with other content types, adding HTTP Header Manager might require more test reorganization
So I'd suggest just setting application/json as the default content type for GraphQL Request Sampler
Severity: normal
OS: Linux
Contributor guide
Assessment
This issue has not been assessed yet.