2010-09-15 79 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); 
相關問題