use of com.dtflys.forest.logging.LogBodyMessage in project forest by dromara.
the class AbstractHttpclientRequestSender method setLogBody.
protected <T extends HttpRequestBase> void setLogBody(RequestLogMessage logMessage, T httpReq) {
HttpEntityEnclosingRequestBase entityEnclosingRequest = (HttpEntityEnclosingRequestBase) httpReq;
HttpEntity entity = entityEnclosingRequest.getEntity();
if (entity == null) {
return;
}
LogBodyMessage logBodyMessage = new HttpclientLogBodyMessage(entity);
logMessage.setBody(logBodyMessage);
}
use of com.dtflys.forest.logging.LogBodyMessage in project forest by dromara.
the class OkHttp3Executor method setLogBody.
protected void setLogBody(RequestLogMessage message, Request okRequest) {
RequestBody requestBody = okRequest.body();
LogBodyMessage logBodyMessage = new OkHttp3LogBodyMessage(requestBody);
message.setBody(logBodyMessage);
}
Aggregations