Determines whether this UnityWebRequest will include Expect: 100-Continue
in its outgoing request headers. (Default: true
).
If this property is set to true
, then this UnityWebRequest will include an Expect: 100-Continue
header in the initial outbound request. If set to false
, an empty Expect
header will be sent, which will suppress usage of the 100 Continue
response code.
As detailed in RFC 2616, Section 8, the 100 Continue
response code is intended to allow a remote server to decide whether or not it will accept a request based on a request's headers, prior to the client transmitting the full request body.
This is useful in cases where the client need not transmit its full request to every server in a request/response chain, such as in a load-balanced application. For example, a client would present its request, with a Expect: 100-Continue
header, to a load-balancing server. The load-balancing server would then respond with a redirect to a processing server. Next, the client would connect to the processing server and transmit the same request, again with a Expect: 100-Continue
server. The processing server would then respond with a 100 Continue
HTTP status code, and the client would finally respond with the full body of its request.
By using the 100 Continue
status code, the client only had to transmit the full body of its request to one server. If not using the 100 Continue
status code, the client must transmit the full body of its request to every server it communicates with, needlessly consuming bandwidth and processing time on both the client and any servers issuing redirects.
In general, one should leave 100 Continue
enabled. Exceptions include requests which have a very small or no request body, or applications where the client knows the server will not issue a redirect.
This property defaults to true
.
Note: On WebGL build targets, header negotiation is performed by the host browser. Therefore, this setting's value has no effect on WebGL builds.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.