You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System.Net.Http/HttpClient.xml
+44-8Lines changed: 44 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -368,9 +368,32 @@ The specified `handler` will be disposed of by calling [HttpClient.Dispose](xref
368
368
<ReturnType>System.Net.IWebProxy</ReturnType>
369
369
</ReturnValue>
370
370
<Docs>
371
-
<summary>To be added.</summary>
372
-
<value>To be added.</value>
373
-
<remarks>To be added.</remarks>
371
+
<summary>Gets or sets the global Http proxy.</summary>
372
+
<value>A proxy used by every call that instantiates a <seecref="T:System.Net.HttpWebRequest" />.</value>
373
+
<remarks>
374
+
<formattype="text/markdown"><![CDATA[
375
+
376
+
## Remarks
377
+
This static property determines the default proxy that all <xref:System.Net.Http.HttpClient> instances use if no proxy is set explicitly in the <xref:System.Net.Http.HttpClientHandler> passed through its constructor.
378
+
379
+
The default instance returned by this property will initialize following a different set of rules depending on your platform:
380
+
* **For Windows:** Reads proxy configuration from environment variables or, if those are not defined, from the user's proxy settings.
381
+
382
+
* **For macOS:** Reads proxy configuration from environment variables or, if those are not defined, from the system's proxy settings.
383
+
384
+
* **For Linux:** Reads proxy configuration from environment variables or, in case those are not defined, this property initializes a non-configured instance that bypasses all addresses.
385
+
386
+
The environment variables used for `DefaultProxy` initialization on Windows and Unix-based platforms are:
387
+
* HTTP_PROXY: the hostname or IP address of the proxy server used on HTTP requests.
388
+
* HTTPS_PROXY: the hostname or IP address of the proxy server used on HTTPS requests.
389
+
* ALL_PROXY: the hostname or IP address of the proxy server used on HTTP and/or HTTPS requests in case HTTP_PROXY and/or HTTPS_PROXY are not defined.
390
+
* NO_PROXY: a comma-separated list of hostnames that should be excluded from proxying.
391
+
392
+
]]></format>
393
+
</remarks>
394
+
<exceptioncref="T:System.ArgumentNullException">
395
+
The value passed cannot be <seelangword="null" />.
396
+
</exception>
374
397
</Docs>
375
398
</Member>
376
399
<MemberMemberName="DefaultRequestHeaders">
@@ -429,10 +452,23 @@ The specified `handler` will be disposed of by calling [HttpClient.Dispose](xref
429
452
<ReturnType>System.Version</ReturnType>
430
453
</ReturnValue>
431
454
<Docs>
432
-
<summary>To be added.</summary>
433
-
<value>To be added.</value>
434
-
<remarks>To be added.</remarks>
435
-
</Docs>
455
+
<summary>Gets or sets the default HTTP version used on subsequent requests made by this <seecref="T:System.Net.Http.HttpClient" /> instance.</summary>
456
+
<value>The default version to use for any requests made with this <seecref="T:System.Net.Http.HttpClient" /> instance.</value>
457
+
<remarks>
458
+
<formattype="text/markdown"><![CDATA[
459
+
460
+
## Remarks
461
+
`DefaultRequestVersion` is <xref:System.Net.HttpVersion.Version11?displayProperty=nameWithType> by default.
462
+
463
+
The `DefaultRequestVersion` property specifies the default HTTP version to use for any requests sent using this <xref:System.Net.Http.HttpClient> instance, such as calls to <xref:System.Net.Http.HttpClient.GetAsync%2A>, <xref:System.Net.Http.HttpClient.GetStringAsync%2A>, or <xref:System.Net.Http.HttpClient.SendAsync%2A>.
464
+
465
+
The `DefaultRequestVersion` property can be changed as long as the <xref:System.Net.Http.HttpClient> instance has not started any request.
466
+
]]></format>
467
+
</remarks>
468
+
<exceptioncref="T:System.ArgumentNullException">In a set operation, <seelangword="DefaultRequestVersion" /> is <seelangword="null" />.</exception>
469
+
<exceptioncref="T:System.InvalidOperationException">The <seecref="T:System.Net.Http.HttpClient" /> instance has already started one or more requests.</exception>
470
+
<exceptioncref="T:System.ObjectDisposedException">The <seecref="T:System.Net.Http.HttpClient" /> instance has already been disposed.</exception>
<summary>Gets the collection of trailing headers included in an HTTP response.</summary>
488
+
<value>The collection of trailing headers in the HTTP response.</value>
489
+
<remarks>
490
+
<formattype="text/markdown"><.
498
+
499
+
]]></format>
500
+
</remarks>
501
+
<exceptioncref="T:System.Net.Http.HttpRequestException">PROTOCOL_ERROR: The HTTP/2 response contains pseudo-headers in the Trailing Headers Frame.</exception>
0 commit comments