Skip to content

Instantly share code, notes, and snippets.

@fatorx
Last active August 29, 2015 14:19
Show Gist options
  • Save fatorx/cb1d737d10fda160afaf to your computer and use it in GitHub Desktop.
Save fatorx/cb1d737d10fda160afaf to your computer and use it in GitHub Desktop.
Android Volley - postar uma string json
// o terceiro parâmetro é uma string json
JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, url, paramsPost,
new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
//onPostExecute(response);
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Log.i("LOAD NOT WORK!", "Message:" + error);
}
});
queue.add(jsonObjectRequest);
queue.start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment