Skip to content

Commit

Permalink
fix HttpRequestExecutor executePost bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sanshengshui committed Mar 30, 2023
1 parent ed415fa commit e9ea9c2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static HttpResponseEntity executePost(HttpRequestEntity request) {

Request.Builder builder = new Request.Builder();
builder.url(httpBuilder.build()).post(body);
if (!request.getHeaders().isEmpty()) {
if (request.getHeaders() != null && !request.getHeaders().isEmpty()) {
builder.headers(Headers.of(request.getHeaders()));
}
Call call = client.newCall(builder.build());
Expand Down

0 comments on commit e9ea9c2

Please sign in to comment.