by 刘迎光@萤火虫工作室
OpenBI交流群:495266201
MicroService 微服务交流群:217722918
mail: liuyg#liuyingguang.cn
博主首页(==防止爬虫==):http://blog.liuyingguang.cn
public void normalTest()throws Exception, IOException{
CloseableHttpClient httpclient = HttpClients.createDefault();
JAXBContext context = JAXBContext.newInstance("org.xwiki.rest.model.jaxb");
Unmarshaller unmarshaller = context.createUnmarshaller();
HttpUriRequest httpPost = RequestBuilder.get()
.setUri(new URI("http://172.16.200.220:8082/xwiki/rest/wikis/xwiki/spaces/Main/pages/WebHome"))
.setHeader("Accept", "application/xml").build();
CloseableHttpResponse response = httpclient.execute(httpPost);
System.out.println(response.getEntity());
HttpEntity responseEntity=response.getEntity();
Page page = (Page) unmarshaller.unmarshal(responseEntity.getContent());
System.out.println(new Gson().toJson(page));
}
public void testLogin() throws Exception{
CloseableHttpClient httpclient =