【发布时间】:2015-03-02 09:32:54
【问题描述】:
有没有办法用 Volley 发送字节数组?
现在我正在使用这个:
post.setEntity(new ByteArrayEntity(rawPacket.toByteArray()));
try {
response = client.execute(post);
} catch (IOException e) {
e.printStackTrace();
}
Volley 中有这样的东西吗?有一种方法可以通过自定义对象与 POST/GET 请求一起发送吗?
protected Map<String, String> getParams() throws AuthFailureError {
HashMap<String, String> params = new HashMap<>();
params.put("RawPacket", rawPacket.toByteArray().toString());
return params;
}
我需要protected Map<String, ByteArray> getParams() 之类的东西
【问题讨论】:
标签: android post bytearray android-volley