Revert "Accept header forces application/json type even if server (#10337)" (#10440)

This reverts commit 18301d00112e064d80d94f1ca5d6ca6032808ddd.
This commit is contained in:
William Cheng 2021-09-21 18:17:05 +08:00 committed by GitHub
parent ef0186c9cf
commit acdf357b76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 0 deletions

View File

@ -101,6 +101,10 @@ func selectHeaderAccept(accepts []string) string {
return ""
}
if contains(accepts, "application/json") {
return "application/json"
}
return strings.Join(accepts, ",")
}

View File

@ -109,6 +109,10 @@ func selectHeaderAccept(accepts []string) string {
return ""
}
if contains(accepts, "application/json") {
return "application/json"
}
return strings.Join(accepts, ",")
}

View File

@ -94,6 +94,10 @@ func selectHeaderAccept(accepts []string) string {
return ""
}
if contains(accepts, "application/json") {
return "application/json"
}
return strings.Join(accepts, ",")
}

View File

@ -112,6 +112,10 @@ func selectHeaderAccept(accepts []string) string {
return ""
}
if contains(accepts, "application/json") {
return "application/json"
}
return strings.Join(accepts, ",")
}