本文整理了Java中org.apache.cxf.jaxrs.client.WebClient.encoding()
方法的一些代码示例,展示了WebClient.encoding()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebClient.encoding()
方法的具体详情如下:
包路径:org.apache.cxf.jaxrs.client.WebClient
类名称:WebClient
方法名:encoding
暂无
代码示例来源:origin: stackoverflow.com
WebClient webClient = WebClient
.create("http://localhost:8080/api/kp/rest/upload");
webClient.encoding("UTF-8");
webClient.type(MediaType.MULTIPART_FORM_DATA);
ContentDisposition cd = new ContentDisposition(
代码示例来源:origin: apache/cxf
private void setEntityHeaders(Entity<?> entity) {
type(entity.getMediaType());
if (entity.getLanguage() != null) {
language(entity.getLanguage().toString());
}
if (entity.getEncoding() != null) {
encoding(entity.getEncoding());
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-rs-client
private void setEntityHeaders(Entity<?> entity) {
type(entity.getMediaType());
if (entity.getLanguage() != null) {
language(entity.getLanguage().toString());
}
if (entity.getEncoding() != null) {
encoding(entity.getEncoding());
}
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
private void setEntityHeaders(Entity<?> entity) {
type(entity.getMediaType());
if (entity.getLanguage() != null) {
language(entity.getLanguage().toString());
}
if (entity.getEncoding() != null) {
encoding(entity.getEncoding());
}
}
代码示例来源:origin: apache/cxf
@Test
public void testGetBookQueryGZIP() throws Exception {
String address = "http://localhost:" + PORT + "/bookstore/";
WebClient wc = WebClient.create(address);
wc.acceptEncoding("gzip,deflate");
wc.encoding("gzip");
InputStream r = wc.get(InputStream.class);
assertNotNull(r);
GZIPInputStream in = new GZIPInputStream(r);
String s = IOUtils.toString(in);
in.close();
assertTrue(s, s.contains("id>124"));
}
内容来源于网络,如有侵权,请联系作者删除!