URL url = new URL("http://www.example.com/resource");
HttpClient client = new DefaultHttpClient();
HttpPut put= new HttpPut(url);
List<NameValuePair> pairs = new ArrayList<NameValuePair>();
pairs.add(new BasicNameValuePair("key1", "value1"));
pairs.add(new BasicNameValuePair("key2", "value2"));
put.setEntity(new UrlEncodedFormEntity(pairs));
HttpResponse response = client.execute(put);
[Android] Http Put Request
* Android HttpPut example code
訂閱:
張貼留言
(
Atom
)
沒有留言 :
張貼留言