HTTP Expect 100 Continue header

Jun 29, 2015 at 10:13 AM

I'm using CPP REST to connect to Betfair's API. Recently Betfair has send me an message (which I've tagged to the bottom), that I'm sending a requests to their API containing a 'HTTP Expect 100 Continue' in the header. This needs to be different. My question is this: how do I change within CPP REST (via a call or something) the default behaviour of including this header to NOT including this header. I've been working on this for a couple of days now, and I can't seem to figure out how to do this (which should be kinda straightforward).


(The message I received from Betfair)
The Betfair API team have been investigating issues with the API where the response time intermittently increases by several orders of magnitude.
Our assessment is that a significant cause of this is requests using the HTTP header “Expect: 100-continue”.
Our logs shown that your API application sends the “HTTP Expect 100 Continue” header when making API requests.
We intend to change to the Betfair API so that it responds to the HTTP header “Expect: 100-continue” with an HTTP1.1 compliant response of 417 “Expectation Failed”. This will prevent clients from exhibiting the behaviour described above.
Therefore, we just want to check to ensure that your application won’t be affected when we make the change which is expected within the next 3-4 weeks. We’ll confirm the release date via the Betfair Developer Forum Announcements as soon as this has been decided.
Jun 30, 2015 at 12:47 AM
Hi Arjen,

To try and help figure out what platform are you running on? By default I don't see our code adding in the Expect HTTP header with the value 100-continue. You're sure you aren't adding it to the request headers anywhere?

Jun 30, 2015 at 9:36 AM
Hi Steve,

I'm pretty sure we don't add this header to the code. I've check all request I've made before it is being send (via a 'client.request(
request ).then( [ this ]( http_response response ) -> pplx::task<web::json::value>') and it's definitevely not in there.

Could this be something with my HTTP 1.1 settings or so. I'm developing this application using visual studio 13.


Jun 30, 2015 at 5:32 PM
Hi Arjen,

Are you targeting Windows Desktop or the Windows Runtime (Windows store, phone)?

Jun 30, 2015 at 5:49 PM
Hi Steve,

I'm running the application from a windows server.


Jul 1, 2015 at 7:56 PM
Hi Arjen,

Ok the underlying implementation is the same for Windows desktop/server, it sits on top of WinHttp. I tried using a Windows Server 2012 R2 machine and didn't see the Expect header included in any requests by default. Can you provide a small repro making an HTTP request that causes the Expect header to be included?