Skip to content

Commit

Permalink
fix wrong content-type header
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny-chung committed Feb 21, 2024
1 parent 2375287 commit ee9510d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ fun UserRequestTemplate.toHttpRequest(
application = application,
)

if (req.headers.none { "content-type".equals(it.first, ignoreCase = true) } && req.contentType.headerValue != null) {
req = req.copy(headers = req.headers + ("Content-Type" to req.contentType.headerValue!!))
}

if (application == ProtocolApplication.Graphql) {
val graphqlBody = req.body as GraphqlBody
val baseGraphqlBody = baseExample.body as GraphqlBody
Expand Down

0 comments on commit ee9510d

Please sign in to comment.