java - 关于NameValuePair
伊谢尔伦
伊谢尔伦 2017-04-18 09:15:48
0
2
419

需要用httppost想服务器发送请求,服务器的参数有int和double类型的。但是客户端这边发送的时候只能
NameValuePair aa = new BasicNameValuePair(String key, String value);
只有这样的啊。好像没有可以传double类型的和int类型的啊。求大神解答下了

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(2)
小葫芦

NameValuePair aa = new BasicNameValuePair(String key, String value);中的value就是你要传的值。至于什么类型在服务器根据你value对应的key to do the corresponding conversion.

刘奇

All parameters in the HTTP protocol are expressed in text, so you can use String.valueOf() to convert other types of parameters into strings and pass them in.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!