Handling HTTP code 417: Expectation failed

From Rackspace Email & Apps API
Revision as of 11:02, 15 June 2010 by Zhen.wei (talk | contribs) (add http 417 error page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Some HTTP libraries automatically add a header named Expect and fill it with '100-continue'. If your program is getting the HTTP status code 417 you will need to disable the header using your language's library.


.NET

The ServicePointManager has a property named Expect100Continue. Set this to false.

System.Net.ServicePointManager.Expect100Continue = false;


PHP

If you're using PHP's curl, manually empty the Expect header.

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));