AnsonLoveLina opened a new issue, #9361:
URL: https://github.com/apache/seatunnel/issues/9361
org.apache.seatunnel.connectors.seatunnel.http.client.HttpClientProvider#addBody
该方法的
代码
private void addBody(HttpEntityEnclosingRequestBase request, String
body) {
if (checkAlreadyHaveContentType(request)) {
return;
}
request.addHeader(HTTP.CONTENT_TYPE, APPLICATION_JSON);
if (StringUtils.isBlank(body)) {
body = "";
}
StringEntity entity = new StringEntity(body,
ContentType.APPLICATION_JSON);
entity.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE,
APPLICATION_JSON));
request.setEntity(entity);
}
entity.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE,
APPLICATION_JSON));
应该为
entity.setContentEncoding(new BasicHeader(HTTP.CONTENT_ENCODING,
APPLICATION_JSON));
不然会让某些情况的REST接口访问出现400
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]