Remove Expect header in Android’s org.apache.http
The removeHeader() call won’t work for you. You have to remove a request interceptor.
DefaultHttpClient httpclient = new DefaultHttpClient();
httpclient.removeRequestInterceptorByClass(
org.apache.http.protocol.RequestExpectContinue.class);
This took me a while to track down, unfortunately, so I’m blogging it here so others can hopefully save some time.
Thanks, I just had this problem, too.
For the people using Groovy HTTP Builder:
HTTPBuilder builder = createHTTPBuilder()
builder.client.removeRequestInterceptorByClass(RequestExpectContinue)
Good to know! Hopefully now people won’t have to spend hours like we did.