【发布时间】:2013-09-09 13:34:16
【问题描述】:
尝试像这样从 Android 应用程序向服务器发送文件内容:
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://www.yoursite.com/script.php");
final InputStreamEntity reqEntity = new InputStreamEntity(
gdFileSystemDelegate.openFileInput(openFileInput(FilePath), -1);
reqEntity.setContentType("application/octet-stream");
httppost.setEntity(reqEntity);
httpClient.execute(httppost);
但它会引发异常: 无法使用不可重复的请求实体重试请求
这是什么意思?如何解决?
【问题讨论】:
标签: android http httpclient httprequest