case OPTIONS: httpMethod = new OptionsMethod(uri); break;
case TRACE: httpMethod = new TraceMethod(uri); break;
default: httpMethod = getMethod(new ExtensionMethod(method,uri), entity);
}
if (actual != null) {
httpMethod.addRequestHeader("X-HTTP-Method-Override", actual.name());
}
initHeaders(options, httpMethod);
// by default use expect-continue is enabled on the client
// only disable if explicitly disabled