
net.dongliu.commons.request.code.StringBodyTransformer Maven / Gradle / Ivy
package net.dongliu.commons.request.code;
import org.apache.http.HttpEntity;
import org.apache.http.util.EntityUtils;
import java.io.IOException;
/**
* @author Dong Liu
*/
public class StringBodyTransformer implements BodyTransformer {
@Override
public String fromBody(HttpEntity httpEntity) {
try {
return EntityUtils.toString(httpEntity);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy