Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
G1org1owo committed Jan 13, 2024
2 parents b9e3fe2 + 78235db commit fe24967
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/jszuru/SzurubooruAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.io.*;
import java.lang.reflect.InvocationTargetException;
import java.net.*;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.regex.Pattern;

Expand Down Expand Up @@ -219,7 +220,7 @@ public Map<String, Object> call(String method,
httpRequest.setHeader("Content", "application/json");

if(body!=null && httpRequest instanceof HttpEntityEnclosingRequest sendRequest){
sendRequest.setEntity(new StringEntity(gson.toJson(body)));
sendRequest.setEntity(new StringEntity(gson.toJson(body), ContentType.APPLICATION_JSON));
}

HttpResponse response = httpClient.execute((HttpUriRequest) httpRequest);
Expand Down

0 comments on commit fe24967

Please sign in to comment.