需要把一个压缩包文件通过http请求方法来传递给对方接受怎么弄
DefaultHttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(url);
FileBody bin = new FileBody(new File("F:/project/1.zip"));
StringBody comment = new StringBody("1.zip");
StringBody context = new StringBody(obj.toString());
MultipartEntity reqEntity = new MultipartEntity();
reqEntity.addPart("file1", bin);//file1为请求后台的File upload;属性
reqEntity.addPart("filename1", comment);//filename1为请求后台的普通参数;属性
httppost.setEntity(reqEntity);
HttpResponse response = httpclient.execute(httppost);
int statusCode = response.getStatusLine().getStatusCode();