且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

带有发帖请求和参数的HttpUrlConnection作为Json对象android

更新时间:2023-01-17 17:01:27

我强烈建议使用 Unirest 其一个用于发出http请求的简单库,它具有非常易于使用的api,并且不会使内存过多地过载,这是一个示例,说明了如何使用示例代码.

I higly recommend using Unirest its a simple library for making http requests it has a very easy to use api and it doesnt overload the mem too much, here's an example on how would it be using your example code.

Unirest.post("https://example.com")
.queryString("places", "['LNCf206KYa5b', 'oWdC0hnm1jjJ']")
.queryString("action", "Do")
.asJson()