w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Android Call XML Webservice containing parameter in url

This should work!

public void postData() {
    HttpClient httpclient = new DefaultHttpClient();
    HttpPost httppost = new
HttpPost("http://api.crmseries.com/user/ValidateUser");

try {
    // Add your data
    List<NameValuePair> nameValuePairs = new
ArrayList<NameValuePair>(2);
    nameValuePairs.add(new BasicNameValuePair("email",
"don@crmSerssies.com"));
    nameValuePairs.add(new BasicNameValuePair("password", "visi"));
    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
}
}




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.