httpclientutil icon indicating copy to clipboard operation
httpclientutil copied to clipboard

关于传参的一个问题

Open devh0407 opened this issue 6 years ago • 1 comments

我用这个调用微信接口。有些接口是推xml数据,不需要key,请问有没有设置的方法 因为我看现在好像只能是推key-value的map

devh0407 avatar Oct 12 '18 10:10 devh0407

Header[] headers = HttpHeader.custom().contentType("application/xml").build();

方式一:调用config.json(xml).headers(headers),然后再调用HttpClientUtil进行调用试试。 方式二:调用config.map(Utils.ENTITY_STRING, xml).headers(headers),然后再调用HttpClientUtil进行调用试试。

Arronlong avatar Oct 17 '18 03:10 Arronlong