I want to make a request whith method `POST` or `GET`. 

I just try with method `POST` but I don't have success. 

Here is my URL: <http://test.anakel.mx/utils/webservice.php>

These are my values:

```
UID=login

correo=test@gmail.com

password=123456

idDevice=PRUEBA01

arg1=Droid

arg2=JellyBean

arg3=IMEI

```

If you copy/paste in the browser: 

```
http://test.anakel.mx/utils/webservice.php?UID=login&correo=test@gmail.com&password=123456&idDevice=PRUEBA01&arg1=Droid&arg2=JellyBean&arg3=IMEI

```

The answer will be: 

```
[{"idUsuario":129,"nombreCompleto":"test1 test ","correo":"test@gmail.com","idcentroDefault":1}]

```

And, I want to show this in a `TextView`

My Code:

```
public void enviar(View vista) throws IOException {

   String txt = executeHttpPost();

    displayMessange(txt);

   /* String query =  executeHttpPost("http://test.anakel.mx/utils/webservice.php");
    displayMessange(query);*/

}

public void displayMessange(String message) {
    TextView query = (TextView) findViewById(R.id.query);
    query.setText(message);
}

public String executeHttpPost() throws IOException {

    BufferedReader in = null;
    try {
        EditText user = (EditText) findViewById(R.id.user);
        EditText password = (EditText) findViewById(R.id.password);
        String contraseña = password.getText().toString();
        String usuario = user.getText().toString();

        HttpClient client = new DefaultHttpClient();
        HttpPost post = new HttpPost("http://test.anakel.mx/utils/webservice.php");

        List<NameValuePair> pairs = new ArrayList<NameValuePair>();
        pairs.add(new BasicNameValuePair("UID", usuario));
        pairs.add(new BasicNameValuePair("correo","test@gmail.com"));
        pairs.add(new BasicNameValuePair("password", contraseña));
        pairs.add(new BasicNameValuePair("idDevice", "PRUEBA01"));
        pairs.add(new BasicNameValuePair("arg1", "Droid"));
        pairs.add(new BasicNameValuePair("arg2", "JellyBean"));
        pairs.add(new BasicNameValuePair("arg3", "IMEI"));
        post.setEntity(new UrlEncodedFormEntity(pairs,"UTF-8"));

        HttpResponse response = client.execute(post);
         InputStream is = response.getEntity().getContent();
        String datos = convertStreamToString(is);
        return datos;

    }
    catch(Exception e) { return "error";}

}

private static String convertStreamToString(InputStream is) {
    /*
     * To convert the InputStream to String we use the BufferedReader.readLine()
     * method. We iterate until the BufferedReader return null which means
     * there's no more data to read. Each line will appended to a StringBuilder
     * and returned as String.
     */
    BufferedReader reader = new BufferedReader(new InputStreamReader(is));
    StringBuilder sb = new StringBuilder();

    String line = null;
    try {
        while ((line = reader.readLine()) != null) {
            sb.append(line + "\n");
        }
    } catch (IOException e) {
        e.printStackTrace();
    } finally {
        try {
            is.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    return sb.toString();
}

```

My aplication have the User and Password from two `EditText`s.

`android:id="@+id/password` where I write login
`android:id="@+id/user` where I write `123456`.

```
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:orientation="vertical"
android:background="@drawable/wallhaven">

<TextView
    android:textColor="#FFF"
    android:textSize="30sp"
    android:paddingBottom="22dp"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Login"
    android:backgroundTintMode="add"
    android:layout_gravity="center"/>

<EditText

    android:textColor="#FFF"
    android:padding="25dp"
    android:id="@+id/user"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint="User"
    android:inputType="textEmailAddress"/>

<EditText
    android:textColor="#FFF"
    android:padding="25dp"
    android:id="@+id/password"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint="password"
    android:imeOptions="actionSend"
    android:inputType="textPassword"/>

<TextView
    android:layout_height="wrap_content"
    android:layout_width="match_parent"
    android:text="Query"
    android:id="@+id/query"
    android:textColor="#FFF"
    android:layout_gravity="center"
    android:padding="20dp"/>

<Button
    android:id="@+id/enviar"
    android:onClick="enviar"
    android:layout_marginTop="220dp"
    android:layout_width="100dp"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:text="@string/send" />

```

But I just receive a request with the message **error**.