Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can make GET or POST requests using <a href="http://developer.android.com/reference/android/net/http/AndroidHttpClient.html" rel="nofollow noreferrer">AndroidHttpClient</a>:</p> <ol> <li>Create an <a href="http://developer.android.com/reference/android/net/http/AndroidHttpClient.html" rel="nofollow noreferrer">AndroidHttpClient</a> to execute your requests.</li> <li>Create either an <a href="http://developer.android.com/reference/org/apache/http/client/methods/HttpGet.html" rel="nofollow noreferrer">HttpGet</a> or <a href="http://developer.android.com/reference/org/apache/http/client/methods/HttpPost.html" rel="nofollow noreferrer">HttpPost</a> request.</li> <li>Use <a href="http://developer.android.com/reference/org/apache/http/client/methods/HttpEntityEnclosingRequestBase.html#setEntity%28org.apache.http.HttpEntity%29" rel="nofollow noreferrer">setEntity</a> and <a href="http://developer.android.com/reference/org/apache/http/HttpMessage.html#setHeader%28java.lang.String,%20java.lang.String%29" rel="nofollow noreferrer">setHeader</a> methods to populate the request.</li> <li>Use one of the <a href="http://developer.android.com/reference/android/net/http/AndroidHttpClient.html#execute%28org.apache.http.client.methods.HttpUriRequest%29" rel="nofollow noreferrer">execute</a> methods on your client with your request.</li> </ol> <p><a href="https://stackoverflow.com/questions/874227/android-project-using-httpclient-http-client-apache-post-get-method/903387#903387">This answer</a> seems like a fairly complete code sample.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload