Why my HttpPut sends a GET request from my Android?
I try to connect to a REST webservice from my Android device and PUT some data there, but all I get is a GET result. Even my webserver insists it's a GET request. What is wrong with my code?

    DefaultHttpClient httpclient = new DefaultHttpClient();
    HttpPut httpPut = new HttpPut(url);
    httpPut.addHeader("Content-Type", "application/xml; charset=utf-8");
    httpPut.addHeader("User-Agent", "Android");
    HttpEntity entity = new StringEntity(data);
    httpPut.setEntity(entity);
    HttpResponse response = httpclient.execute(httpPut);
    HttpEntity input = response.getEntity();
    StringBuilder result = new StringBuilder();
    if (input != null) {
        InputStream instream = input.getContent();
        result = convertStreamToString(instream);
        instream.close();
    }
    httpclient.getConnectionManager().shutdown();
    return result.toString();
Why my HttpPut sends a GET request from my Android?
===

I try to connect to a REST webservice from my Android device and PUT some data there, but all I get is a GET result. Even my webserver insists it's a GET request. What is wrong with my code?

    DefaultHttpClient httpclient = new DefaultHttpClient();
    HttpPut httpPut = new HttpPut(url);
    httpPut.addHeader("Content-Type", "application/xml; charset=utf-8");
    httpPut.addHeader("User-Agent", "Android");
    HttpEntity entity = new StringEntity(data);
    httpPut.setEntity(entity);
    HttpResponse response = httpclient.execute(httpPut);
    HttpEntity input = response.getEntity();
    StringBuilder result = new StringBuilder();
    if (input != null) {
        InputStream instream = input.getContent();
        result = convertStreamToString(instream);
        instream.close();
    }
    httpclient.getConnectionManager().shutdown();
    return result.toString();