Advertisement
Guest User

RegisterRequest.java

a guest
Sep 2nd, 2016
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. package com.tonikamitv.loginregister;
  2.  
  3. import com.android.volley.Response;
  4. import com.android.volley.toolbox.StringRequest;
  5.  
  6. import java.util.HashMap;
  7. import java.util.Map;
  8.  
  9. public class RegisterRequest extends StringRequest {
  10. private static final String REGISTER_REQUEST_URL = "http://192.168.0.xx/Yield/PhpFiles/register.php";
  11. private Map<String, String> params;
  12.  
  13. public RegisterRequest(String name, String username, int age, String password, Response.Listener<String> listener) {
  14. super(Method.POST, REGISTER_REQUEST_URL, listener, null);
  15. params = new HashMap<>();
  16. params.put("name", name);
  17. params.put("age", age + "");
  18. params.put("username", username);
  19. params.put("password", password);
  20. }
  21.  
  22. @Override
  23. public Map<String, String> getParams() {
  24. return params;
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement