Handling HTTP code 417: Expectation failed

From Rackspace Email & Apps API
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:'));