Advertisement
Guest User

Untitled

a guest
Jan 19th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. FirstName: '',
  2. MiddleName: '',
  3. LastName: '',
  4. EmailAddress: '',
  5. ReceiveUpdates: false,
  6. Login: {
  7. UserName: '',
  8. Password: '',
  9. }
  10.  
  11. AsyncHttpClient client = new AsyncHttpClient();
  12. RequestParams params = new RequestParams();
  13. params.put("FirstName", "ALi");
  14. params.put("MiddleName", "Farhan");
  15. params.put("LastName", "Ali");
  16. params.put("EmailAddress", "far67890@gmail.com");
  17. params.put("ReceiveUpdates", "false");
  18. params.put("UserName", "farhan6");
  19. params.put("Password", "cricket");
  20.  
  21. client.post("http://urb-app.com/Buyer/Register", params, new AsyncHttpResponseHandler() {
  22.  
  23. @Override
  24. public void onSuccess(String s) {
  25. super.onSuccess(s);
  26. Toast.makeText(getApplicationContext(), "Success :" + s, Toast.LENGTH_LONG).show();
  27. // tv.append("service_ReloadSqlDB" + " " + s);
  28. }
  29.  
  30. @Override
  31. public void onFailure(Throwable throwable) {
  32. super.onFailure(throwable);
  33. Toast.makeText(getApplicationContext(), "Server Response for onFailure ", Toast.LENGTH_LONG).show();
  34. }
  35. });
  36.  
  37. Login: {
  38. UserName: '',
  39. Password: '',
  40. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement