同样的代码,在JAVA和android里得到的httpresponse不一样为什么呢?主要代码如下。HttpClient httpclient = new DefaultHttpClient();HttpPost httppost = new HttpPost(url);FileBody bin = new FileBody(new File(fileName));StringBody comment = new StringBody("Filename: " + fileName);MultipartEntity reqEntity = new MultipartEntity();reqEntity.addPart("bin", bin);reqEntity.addPart("comment", comment);httppost.setEntity(reqEntity);HttpResponse response = httpclient.execute(httppost);HttpEntity resEntity = response.getEntity();java得到的response内容android得到的:
添加回答
举报
0/150
提交
取消