useHttpContinue
Determines whether this UnityWebRequest will include Expect: 100-Continue in its outgoing request headers. (Default: true ).
Read time 2 minutesLast updated 7 days ago
Definition
- Type: Property
- Namespace: UnityEngine.Networking
- Assembly: UnityEngine.UnityWebRequestModule
public bool useHttpContinue { get; set; }
Remarks
If this property is set to , then this UnityWebRequest will include an header in the initial outbound request. If set to , an empty header will be sent, which will suppress usage of the response code.
trueExpect: 100-ContinuefalseExpect100 ContinueAs detailed in RFC 2616, Section 8, the 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.
100 ContinueThis 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 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 server. The processing server would then respond with a HTTP status code, and the client would finally respond with the full body of its request.
Expect: 100-ContinueExpect: 100-Continue100 ContinueBy using the status code, the client only had to transmit the full body of its request to one server. If not using the 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.
100 Continue100 ContinueIn general, one should leave 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.
100 ContinueThis property defaults to .
trueNote: On WebGL build targets, header negotiation is performed by the host browser. Therefore, this setting's value has no effect on WebGL builds.