1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
HttpClient httpClient = new DefaultHttpClient();
HttpPost post = new HttpPost(_httpServer);// _httpServer = "https://bla_2014.site.com/DBCode/API.php"
try{
List<NameValuePair> pairs = new ArrayList<NameValuePair>(5);
pairs.add(new BasicNameValuePair("WristbandID", _uid));
pairs.add(new BasicNameValuePair("Firstname", _firstname));
pairs.add(new BasicNameValuePair("Lastname",""));
pairs.add(new BasicNameValuePair("Email", _email));
pairs.add(new BasicNameValuePair("Phone",""));
post.setEntity( new UrlEncodedFormEntity(pairs) );
_response = httpClient.execute(post); |
Partager