Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Info
To optimize performance and ensure that your application is interacting with the Betfair API as efficiently as possible, we strongly recommend the following as best practice.

Expect: 100- Continue Header

Warning

Sending this header will result in the error: "The remote server returned an error: (417) Expectation Failed."

You should be aware that if using the .Net Framework you will need to set the relevant property in the ServicePointManager which then prevents the "Expect" header from being added:

System.Net.ServicePointManager.Expect100Continue = false;

Enabling HTTP compression

...

We recommend that Connection: keep-alive header is set for all requests to guarantee a persistent connection and therefore reducing latency.

Expect: 100- Continue Header

Set this  to false to ensure that no additional latency is added to your API response time.

You should be aware that if using the .Net Framework you will need to set the relevant property in the ServicePointManager which then prevents the "Expect" header from being added:

System.Net.ServicePointManager.Expect100Continue = false;

Other performance tips

Additional advice regarding optimizing HTTPClient performance can be found via http://hc.apache.org/httpclient-3.x/performance.html