[Java-okhttp-gson] Do not set content-type if content type is null #2 (#11315)

* Fixing empty Content-Type in HTTP requests

* Updating samples
This commit is contained in:
mvistein
2022-01-16 03:29:47 +01:00
committed by GitHub
parent 0427681bc4
commit c12456de8e
28 changed files with 152 additions and 152 deletions

View File

@@ -123,7 +123,7 @@ public class PingApi {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}