需要用httppost想服务器发送请求,服务器的参数有int和double类型的。但是客户端这边发送的时候只能 NameValuePair aa = new BasicNameValuePair(String key, String value); 只有这样的啊。好像没有可以传double类型的和int类型的啊。求大神解答下了
All parameters in the HTTP protocol are expressed in text, so you can useString.valueOf()to convert other types of parameters into strings and pass them in.
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.