I am facing a problem in HttpDelete
Request in android to send rest API.
When I hit the API it shows error. There is a need of content-type and I am setting it in header but didn't find any solution I need help.
And this is my code which I have tried:
DefaultHttpClient defaultHttpClient = new DefaultHttpClient();
String paramString = URLEncodedUtils.format(nameValuePairs, "utf_8");
url += "?" + paramString;
HttpDelete httpDelete = new HttpDelete(url);
httpDelete.setHeader("Iauth" ,"1");
httpDelete.setHeader("Msessid" ,sessionid);
httpDelete.addHeader("content-type","x-www-form-urlencoded");
Log.d("URLLLLL",url);
// httpPost.setHeader("content-type","application/x-www-form-urlencoded;charset=UTF-8");
HttpResponse httpResponse = defaultHttpClient.execute(httpDelete);
HttpEntity httpEntity = httpResponse.getEntity();
inputStream = httpEntity.getContent();