2010-09-15 81 views

回答

3

我已经包括了Apache的mime4j-0.6和httpmime-4.0.1获得这个功能。借助这些库,您可以创建多部分/表单数据请求,并使用标准HttpClient发送它们。

//total pseudo-code; class names are right, though 
HttpPost post; 
MulitpartEntity mpe; 
mpe.addPart("file", new InputStreamBody() or new FileBody()); 
post.setEntity(mpe); 
httpClient.execute(post); 
相关问题