我使用 BasicNameValuePair 类在我的 Android 应用程序中通过 HttpPost 传递字符串参数。如何传递非字符串参数,如 Double、Byte Array 等?
提前致谢
最佳答案
简答: 你不能。不是真的。
长答案: 可以轻松转换为字符串的内容,您只需转换为字符串 (.toString) 并解析 (Double.parseStr())。
字节数组的常见做法是将它们编码为 - 例如 - Base64。 Android docs here
关于android - 如何使用 HttpPost 传递非字符串参数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7307974/