We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6b9e3e commit 4ba4b90Copy full SHA for 4ba4b90
libraries/jersey2/ApiClient.mustache
@@ -573,7 +573,7 @@ public class ApiClient {
573
entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE);
574
} else {
575
// We let jersey handle the serialization
576
- entity = Entity.entity(obj, contentType);
+ entity = Entity.entity(obj == null ? Entity.text("") : obj, contentType);
577
}
578
return entity;
579
@@ -732,7 +732,7 @@ public class ApiClient {
732
733
734
735
- Entity<?> entity = (body == null) ? Entity.json("") : serialize(body, formParams, contentType);
+ Entity<?> entity = serialize(body, formParams, contentType);
736
737
Response response = null;
738
0 commit comments