set_expectations


Description:

public void set_expectations (Expectation expectations)

Sets this's "Expect" header according to expectations.

Currently CONTINUE is the only known expectation value. You should set this value on a request if you are sending a large message body (eg, via POST or PUT), and want to give the server a chance to reject the request after seeing just the headers (eg, because it will require authentication before allowing you to post, or because you're POSTing to a URL that doesn't exist). This saves you from having to transmit the large request body when the server is just going to ignore it anyway.

Parameters:

this

a MessageHeaders

expectations

the expectations to set