0
私はアンドロイドで投稿リクエストを送信する方法を知っています。私は、次のコード例を使用しています:HttpPostリクエストを送信中のHttpEntityの概念
...
HttpPost httpPostRequest = new HttpPost(url);
private ArrayList <NameValuePair> params = new ArrayList<NameValuePair>();
private ArrayList <NameValuePair> headers = new ArrayList<NameValuePair>();
.....
for(int i = 0; i < headers.size(); i++) {
StringEntity entity = new StringEntity(headers.get(i).getValue(),"UTF-8");
httpPostRequest.setEntity(entity);
}
if(!params.isEmpty()){
HttpEntity httpEntity = new UrlEncodedFormEntity(params,HTTP.UTF_8);
httpPostRequest.setEntity(httpEntity);
}
String serverResponse = executeRequest(httpPostRequest);
...
私はちょうどHttpEntity
の概念が何であるかを知りたいですか? HttpEntity
クラスの背後にあるアイデアは何ですか?