Last active
December 2, 2015 20:09
-
-
Save andersonqi/b2c948adf7f82f9ef9d8 to your computer and use it in GitHub Desktop.
Volley Post Request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String url = ""; | |
final StringRequest postRequest = new StringRequest(Request.Method.POST, url, | |
new Response.Listener<String>() { | |
@Override | |
public void onResponse(String response) { | |
} | |
}, | |
new Response.ErrorListener() { | |
@Override | |
public void onErrorResponse(VolleyError error) { | |
error.printStackTrace(); | |
} | |
} | |
) { | |
@Override | |
protected Map<String, String> getParams() { | |
Map<String, String> params = new HashMap<>(); | |
// the POST parameters: | |
} | |
}; | |
Volley.newRequestQueue(this).add(postRequest); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment