Is it possible to send a simple text in the body of a StringRequest using DELETE-Method?
I couldn't find any example where somebody put something in the body of a request... This is my request and I want to add "{'deviceid':'xyz'}" to the body (method is DELETE):
final StringRequest stringRequest = new StringRequest(method, url + "?token=" + token, new Response.Listener<String>() {
@Override
public void onResponse(String jsonResponse) {
// do something
}, new Response.ErrorListener() {
// do something
}
}) {
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap<String, String>();
headers.put("api-version", "1");
return headers;
}
};