Skip to content

Commit

Permalink
static variable in the MediaType class use instead of a plain string …
Browse files Browse the repository at this point in the history
…for the content-type header
  • Loading branch information
yusuf.ozacet committed Sep 15, 2023
1 parent 3916ac9 commit 0c3099c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public RedirectView callback(@PathVariable String gitProvider, String code) {
HttpRequest httpRequest = HttpRequest
.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/x-www-form-urlencoded")
.header("Content-Type", MediaType.APPLICATION_FORM_URLENCODED_VALUE)
.header("Accept", MediaType.APPLICATION_JSON_VALUE)
.header("User-Agent", "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0")
.POST(HttpRequest.BodyPublishers.ofString(buildQueryString(params)))
Expand Down

0 comments on commit 0c3099c

Please sign in to comment.