I a a new comer to Android development. I am trying to upload an image through HTTP PUT from an android device. When i run the following code, my response shows HTTP/1.1 400 Bad Request error.
Any help to solve this issue will be appreciated. Here is the code snippet i have been using.
File file = new File(imageAdd);
HttpPut job = new HttpPut("http://api.abcd.com/");
FileEntity entity = new FileEntity(file, "image/jpeg");
entity.setChunked(true);
job.setEntity(entity);
HttpResponse response = httpClient.execute(host,job,credContext);