Tor*_*ups 40 java android json httpclient http-post
我正在尝试在java中为我正在处理的Android应用发布一些JSON数据.以下是有效的还是我需要以不同的方式推送JSON字符串?
HttpPost httpost = new HttpPost("http://test.localhost");
httpost.setEntity(new StringEntity("{\"filters\":true}"));
httpost.setHeader("Accept", "application/json");
httpost.setHeader("Content-type", "application/x-www-form-urlencoded; charset=UTF-8");
//... other java code to execute the apache httpclient
Run Code Online (Sandbox Code Playgroud)
先感谢您
| 归档时间: |
|
| 查看次数: |
34253 次 |
| 最近记录: |