title: Sending Integer to HTTP Server using NameValuePair
body: <p>I want to send a couple of values to a web server from my Android Client using this <code>NameValuePair</code> method:</p>
  
  <pre><code>public void postData() {
          // Create a new HttpClient and Post Header
          HttpClient httpclient = new DefaultHttpClient();
          HttpPost httppost = new HttpPost("http:/xxxxxxx");
  
          try {
              // Add your data
              List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(1);
              String amount = paymentAmount.getText().toString();
              String email = inputEmail.getText().toString();
              nameValuePairs.add(new BasicNameValuePair("donationAmount", amount));
              nameValuePairs.add(new BasicNameValuePair("email", email));
              nameValuePairs.add(new BasicNameValuePair("paymentMethod", "5"));
              httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
  
              // Execute HTTP Post Request
              HttpResponse response = httpclient.execute(httppost);
  
          } catch (ClientProtocolException e) {
              // TODO Auto-generated catch block
          } catch (IOException e) {
              // TODO Auto-generated catch block
          }
      } 
  </code></pre>
  
  <p>Unfortunately <code>NameValuePair</code> is only able to send String, I need to send Integer values as well.</p>