forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSystem.Net.Requests.cs
More file actions
554 lines (553 loc) · 39.3 KB
/
System.Net.Requests.cs
File metadata and controls
554 lines (553 loc) · 39.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// ------------------------------------------------------------------------------
// Changes to this file must follow the https://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Net
{
[System.ObsoleteAttribute("AuthenticationManager is not supported. Methods will no-op or throw PlatformNotSupportedException.", DiagnosticId="SYSLIB0009", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public partial class AuthenticationManager
{
internal AuthenticationManager() { }
public static System.Net.ICredentialPolicy? CredentialPolicy { get { throw null; } set { } }
public static System.Collections.Specialized.StringDictionary CustomTargetNameDictionary { get { throw null; } }
public static System.Collections.IEnumerator RegisteredModules { get { throw null; } }
public static System.Net.Authorization? Authenticate(string challenge, System.Net.WebRequest request, System.Net.ICredentials credentials) { throw null; }
public static System.Net.Authorization? PreAuthenticate(System.Net.WebRequest request, System.Net.ICredentials credentials) { throw null; }
public static void Register(System.Net.IAuthenticationModule authenticationModule) { }
public static void Unregister(System.Net.IAuthenticationModule authenticationModule) { }
public static void Unregister(string authenticationScheme) { }
}
public partial class Authorization
{
public Authorization(string? token) { }
public Authorization(string? token, bool finished) { }
public Authorization(string? token, bool finished, string? connectionGroupId) { }
public bool Complete { get { throw null; } }
public string? ConnectionGroupId { get { throw null; } }
public string? Message { get { throw null; } }
public bool MutuallyAuthenticated { get { throw null; } set { } }
public string[]? ProtectionRealm { get { throw null; } set { } }
}
public partial class FileWebRequest : System.Net.WebRequest, System.Runtime.Serialization.ISerializable
{
[System.ObsoleteAttribute("Serialization has been deprecated for FileWebRequest.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
protected FileWebRequest(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public override string? ConnectionGroupName { get { throw null; } set { } }
public override long ContentLength { get { throw null; } set { } }
public override string? ContentType { get { throw null; } set { } }
public override System.Net.ICredentials? Credentials { get { throw null; } set { } }
public override System.Net.WebHeaderCollection Headers { get { throw null; } }
public override string Method { get { throw null; } set { } }
public override bool PreAuthenticate { get { throw null; } set { } }
public override System.Net.IWebProxy? Proxy { get { throw null; } set { } }
public override System.Uri RequestUri { get { throw null; } }
public override int Timeout { get { throw null; } set { } }
public override bool UseDefaultCredentials { get { throw null; } set { } }
public override void Abort() { }
public override System.IAsyncResult BeginGetRequestStream(System.AsyncCallback? callback, object? state) { throw null; }
public override System.IAsyncResult BeginGetResponse(System.AsyncCallback? callback, object? state) { throw null; }
public override System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult) { throw null; }
public override System.Net.WebResponse EndGetResponse(System.IAsyncResult asyncResult) { throw null; }
[System.ObsoleteAttribute("Serialization has been deprecated for FileWebRequest.")]
protected override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public override System.IO.Stream GetRequestStream() { throw null; }
public override System.Threading.Tasks.Task<System.IO.Stream> GetRequestStreamAsync() { throw null; }
public override System.Net.WebResponse GetResponse() { throw null; }
public override System.Threading.Tasks.Task<System.Net.WebResponse> GetResponseAsync() { throw null; }
[System.ObsoleteAttribute("Serialization has been deprecated for FileWebRequest.")]
void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
}
public partial class FileWebResponse : System.Net.WebResponse, System.Runtime.Serialization.ISerializable
{
[System.ObsoleteAttribute("Serialization has been deprecated for FileWebResponse.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
protected FileWebResponse(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public override long ContentLength { get { throw null; } }
public override string ContentType { get { throw null; } }
public override System.Net.WebHeaderCollection Headers { get { throw null; } }
public override System.Uri ResponseUri { get { throw null; } }
public override bool SupportsHeaders { get { throw null; } }
public override void Close() { }
[System.ObsoleteAttribute("Serialization has been deprecated for FileWebResponse.")]
protected override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public override System.IO.Stream GetResponseStream() { throw null; }
[System.ObsoleteAttribute("Serialization has been deprecated for FileWebResponse.")]
void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
}
public enum FtpStatusCode
{
Undefined = 0,
RestartMarker = 110,
ServiceTemporarilyNotAvailable = 120,
DataAlreadyOpen = 125,
OpeningData = 150,
CommandOK = 200,
CommandExtraneous = 202,
DirectoryStatus = 212,
FileStatus = 213,
SystemType = 215,
SendUserCommand = 220,
ClosingControl = 221,
ClosingData = 226,
EnteringPassive = 227,
LoggedInProceed = 230,
ServerWantsSecureSession = 234,
FileActionOK = 250,
PathnameCreated = 257,
SendPasswordCommand = 331,
NeedLoginAccount = 332,
FileCommandPending = 350,
ServiceNotAvailable = 421,
CantOpenData = 425,
ConnectionClosed = 426,
ActionNotTakenFileUnavailableOrBusy = 450,
ActionAbortedLocalProcessingError = 451,
ActionNotTakenInsufficientSpace = 452,
CommandSyntaxError = 500,
ArgumentSyntaxError = 501,
CommandNotImplemented = 502,
BadCommandSequence = 503,
NotLoggedIn = 530,
AccountNeeded = 532,
ActionNotTakenFileUnavailable = 550,
ActionAbortedUnknownPageType = 551,
FileActionAborted = 552,
ActionNotTakenFilenameNotAllowed = 553,
}
public sealed partial class FtpWebRequest : System.Net.WebRequest
{
internal FtpWebRequest() { }
public System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates { get { throw null; } set { } }
public override string? ConnectionGroupName { get { throw null; } set { } }
public override long ContentLength { get { throw null; } set { } }
public long ContentOffset { get { throw null; } set { } }
public override string? ContentType { get { throw null; } set { } }
[System.Diagnostics.CodeAnalysis.DisallowNullAttribute]
public override System.Net.ICredentials? Credentials { get { throw null; } set { } }
public static new System.Net.Cache.RequestCachePolicy? DefaultCachePolicy { get { throw null; } set { } }
public bool EnableSsl { get { throw null; } set { } }
public override System.Net.WebHeaderCollection Headers { get { throw null; } set { } }
public bool KeepAlive { get { throw null; } set { } }
public override string Method { get { throw null; } set { } }
public override bool PreAuthenticate { get { throw null; } set { } }
public override System.Net.IWebProxy? Proxy { get { throw null; } set { } }
public int ReadWriteTimeout { get { throw null; } set { } }
[System.Diagnostics.CodeAnalysis.DisallowNullAttribute]
public string? RenameTo { get { throw null; } set { } }
public override System.Uri RequestUri { get { throw null; } }
public System.Net.ServicePoint ServicePoint { get { throw null; } }
public override int Timeout { get { throw null; } set { } }
public bool UseBinary { get { throw null; } set { } }
public override bool UseDefaultCredentials { get { throw null; } set { } }
public bool UsePassive { get { throw null; } set { } }
public override void Abort() { }
public override System.IAsyncResult BeginGetRequestStream(System.AsyncCallback? callback, object? state) { throw null; }
public override System.IAsyncResult BeginGetResponse(System.AsyncCallback? callback, object? state) { throw null; }
public override System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult) { throw null; }
public override System.Net.WebResponse EndGetResponse(System.IAsyncResult asyncResult) { throw null; }
public override System.IO.Stream GetRequestStream() { throw null; }
public override System.Net.WebResponse GetResponse() { throw null; }
}
public partial class FtpWebResponse : System.Net.WebResponse, System.IDisposable
{
internal FtpWebResponse() { }
public string? BannerMessage { get { throw null; } }
public override long ContentLength { get { throw null; } }
public string? ExitMessage { get { throw null; } }
public override System.Net.WebHeaderCollection Headers { get { throw null; } }
public System.DateTime LastModified { get { throw null; } }
public override System.Uri ResponseUri { get { throw null; } }
public System.Net.FtpStatusCode StatusCode { get { throw null; } }
public string? StatusDescription { get { throw null; } }
public override bool SupportsHeaders { get { throw null; } }
public string? WelcomeMessage { get { throw null; } }
public override void Close() { }
public override System.IO.Stream GetResponseStream() { throw null; }
}
[System.ObsoleteAttribute("GlobalProxySelection has been deprecated. Use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy.")]
public partial class GlobalProxySelection
{
public GlobalProxySelection() { }
[System.Diagnostics.CodeAnalysis.AllowNullAttribute]
public static System.Net.IWebProxy Select { get { throw null; } set { } }
public static System.Net.IWebProxy GetEmptyWebProxy() { throw null; }
}
public delegate void HttpContinueDelegate(int StatusCode, System.Net.WebHeaderCollection httpHeaders);
public partial class HttpWebRequest : System.Net.WebRequest, System.Runtime.Serialization.ISerializable
{
[System.ObsoleteAttribute("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.", DiagnosticId = "SYSLIB0014", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
protected HttpWebRequest(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public string? Accept { get { throw null; } set { } }
public System.Uri Address { get { throw null; } }
public virtual bool AllowAutoRedirect { get { throw null; } set { } }
public virtual bool AllowReadStreamBuffering { get { throw null; } set { } }
public virtual bool AllowWriteStreamBuffering { get { throw null; } set { } }
public System.Net.DecompressionMethods AutomaticDecompression { get { throw null; } set { } }
public System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates { get { throw null; } set { } }
public string? Connection { get { throw null; } set { } }
public override string? ConnectionGroupName { get { throw null; } set { } }
public override long ContentLength { get { throw null; } set { } }
public override string? ContentType { get { throw null; } set { } }
public System.Net.HttpContinueDelegate? ContinueDelegate { get { throw null; } set { } }
public int ContinueTimeout { get { throw null; } set { } }
public virtual System.Net.CookieContainer? CookieContainer { get { throw null; } set { } }
public override System.Net.ICredentials? Credentials { get { throw null; } set { } }
public System.DateTime Date { get { throw null; } set { } }
public static new System.Net.Cache.RequestCachePolicy? DefaultCachePolicy { get { throw null; } set { } }
public static int DefaultMaximumErrorResponseLength { get { throw null; } set { } }
public static int DefaultMaximumResponseHeadersLength { get { throw null; } set { } }
public string? Expect { get { throw null; } set { } }
public virtual bool HaveResponse { get { throw null; } }
public override System.Net.WebHeaderCollection Headers { get { throw null; } set { } }
public string Host { get { throw null; } set { } }
public System.DateTime IfModifiedSince { get { throw null; } set { } }
public bool KeepAlive { get { throw null; } set { } }
public int MaximumAutomaticRedirections { get { throw null; } set { } }
public int MaximumResponseHeadersLength { get { throw null; } set { } }
public string? MediaType { get { throw null; } set { } }
public override string Method { get { throw null; } set { } }
public bool Pipelined { get { throw null; } set { } }
public override bool PreAuthenticate { get { throw null; } set { } }
public System.Version ProtocolVersion { get { throw null; } set { } }
public override System.Net.IWebProxy? Proxy { get { throw null; } set { } }
public int ReadWriteTimeout { get { throw null; } set { } }
public string? Referer { get { throw null; } set { } }
public override System.Uri RequestUri { get { throw null; } }
public bool SendChunked { get { throw null; } set { } }
public System.Net.Security.RemoteCertificateValidationCallback? ServerCertificateValidationCallback { get { throw null; } set { } }
public System.Net.ServicePoint ServicePoint { get { throw null; } }
public virtual bool SupportsCookieContainer { get { throw null; } }
public override int Timeout { get { throw null; } set { } }
public string? TransferEncoding { get { throw null; } set { } }
public bool UnsafeAuthenticatedConnectionSharing { get { throw null; } set { } }
public override bool UseDefaultCredentials { get { throw null; } set { } }
public string? UserAgent { get { throw null; } set { } }
public override void Abort() { }
public void AddRange(int range) { }
public void AddRange(int from, int to) { }
public void AddRange(long range) { }
public void AddRange(long from, long to) { }
public void AddRange(string rangeSpecifier, int range) { }
public void AddRange(string rangeSpecifier, int from, int to) { }
public void AddRange(string rangeSpecifier, long range) { }
public void AddRange(string rangeSpecifier, long from, long to) { }
public override System.IAsyncResult BeginGetRequestStream(System.AsyncCallback? callback, object? state) { throw null; }
public override System.IAsyncResult BeginGetResponse(System.AsyncCallback? callback, object? state) { throw null; }
public override System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult) { throw null; }
public System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult, out System.Net.TransportContext? context) { throw null; }
public override System.Net.WebResponse EndGetResponse(System.IAsyncResult asyncResult) { throw null; }
[System.ObsoleteAttribute("Serialization has been deprecated for HttpWebRequest.")]
protected override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public override System.IO.Stream GetRequestStream() { throw null; }
public System.IO.Stream GetRequestStream(out System.Net.TransportContext? context) { throw null; }
public override System.Net.WebResponse GetResponse() { throw null; }
[System.ObsoleteAttribute("Serialization has been deprecated for HttpWebRequest.")]
void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
}
public partial class HttpWebResponse : System.Net.WebResponse, System.Runtime.Serialization.ISerializable
{
[System.ObsoleteAttribute("This API supports the .NET infrastructure and is not intended to be used directly from your code.", true)]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public HttpWebResponse() { }
[System.ObsoleteAttribute("Serialization has been deprecated for HttpWebResponse.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
protected HttpWebResponse(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public string? CharacterSet { get { throw null; } }
public string ContentEncoding { get { throw null; } }
public override long ContentLength { get { throw null; } }
public override string ContentType { get { throw null; } }
public virtual System.Net.CookieCollection Cookies { get { throw null; } set { } }
public override System.Net.WebHeaderCollection Headers { get { throw null; } }
public override bool IsMutuallyAuthenticated { get { throw null; } }
public System.DateTime LastModified { get { throw null; } }
public virtual string Method { get { throw null; } }
public System.Version ProtocolVersion { get { throw null; } }
public override System.Uri ResponseUri { get { throw null; } }
public string Server { get { throw null; } }
public virtual System.Net.HttpStatusCode StatusCode { get { throw null; } }
public virtual string StatusDescription { get { throw null; } }
public override bool SupportsHeaders { get { throw null; } }
public override void Close() { }
protected override void Dispose(bool disposing) { }
[System.ObsoleteAttribute("Serialization has been deprecated for HttpWebResponse.")]
protected override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public string GetResponseHeader(string headerName) { throw null; }
public override System.IO.Stream GetResponseStream() { throw null; }
[System.ObsoleteAttribute("Serialization has been deprecated for HttpWebResponse.")]
void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
}
public partial interface IAuthenticationModule
{
string AuthenticationType { get; }
bool CanPreAuthenticate { get; }
System.Net.Authorization? Authenticate(string challenge, System.Net.WebRequest request, System.Net.ICredentials credentials);
System.Net.Authorization? PreAuthenticate(System.Net.WebRequest request, System.Net.ICredentials credentials);
}
public partial interface ICredentialPolicy
{
bool ShouldSendCredential(System.Uri challengeUri, System.Net.WebRequest request, System.Net.NetworkCredential credential, System.Net.IAuthenticationModule authenticationModule);
}
public partial interface IWebRequestCreate
{
System.Net.WebRequest Create(System.Uri uri);
}
public partial class ProtocolViolationException : System.InvalidOperationException, System.Runtime.Serialization.ISerializable
{
public ProtocolViolationException() { }
[System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
protected ProtocolViolationException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public ProtocolViolationException(string? message) { }
[System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
}
public partial class WebException : System.InvalidOperationException, System.Runtime.Serialization.ISerializable
{
public WebException() { }
[System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
protected WebException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public WebException(string? message) { }
public WebException(string? message, System.Exception? innerException) { }
public WebException(string? message, System.Exception? innerException, System.Net.WebExceptionStatus status, System.Net.WebResponse? response) { }
public WebException(string? message, System.Net.WebExceptionStatus status) { }
public System.Net.WebResponse? Response { get { throw null; } }
public System.Net.WebExceptionStatus Status { get { throw null; } }
[System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
}
public enum WebExceptionStatus
{
Success = 0,
NameResolutionFailure = 1,
ConnectFailure = 2,
ReceiveFailure = 3,
SendFailure = 4,
PipelineFailure = 5,
RequestCanceled = 6,
ProtocolError = 7,
ConnectionClosed = 8,
TrustFailure = 9,
SecureChannelFailure = 10,
ServerProtocolViolation = 11,
KeepAliveFailure = 12,
Pending = 13,
Timeout = 14,
ProxyNameResolutionFailure = 15,
UnknownError = 16,
MessageLengthLimitExceeded = 17,
CacheEntryNotFound = 18,
RequestProhibitedByCachePolicy = 19,
RequestProhibitedByProxy = 20,
}
public abstract partial class WebRequest : System.MarshalByRefObject, System.Runtime.Serialization.ISerializable
{
[System.ObsoleteAttribute("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.", DiagnosticId = "SYSLIB0014", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
protected WebRequest() { }
[System.ObsoleteAttribute("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.", DiagnosticId = "SYSLIB0014", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
protected WebRequest(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public System.Net.Security.AuthenticationLevel AuthenticationLevel { get { throw null; } set { } }
public virtual System.Net.Cache.RequestCachePolicy? CachePolicy { get { throw null; } set { } }
public virtual string? ConnectionGroupName { get { throw null; } set { } }
public virtual long ContentLength { get { throw null; } set { } }
public virtual string? ContentType { get { throw null; } set { } }
[System.Diagnostics.CodeAnalysis.DisallowNullAttribute]
public virtual System.Net.ICredentials? Credentials { get { throw null; } set { } }
public static System.Net.Cache.RequestCachePolicy? DefaultCachePolicy { get { throw null; } set { } }
public static System.Net.IWebProxy? DefaultWebProxy { get { throw null; } set { } }
public virtual System.Net.WebHeaderCollection Headers { get { throw null; } set { } }
public System.Security.Principal.TokenImpersonationLevel ImpersonationLevel { get { throw null; } set { } }
public virtual string Method { get { throw null; } set { } }
public virtual bool PreAuthenticate { get { throw null; } set { } }
public virtual System.Net.IWebProxy? Proxy { get { throw null; } set { } }
public virtual System.Uri RequestUri { get { throw null; } }
public virtual int Timeout { get { throw null; } set { } }
public virtual bool UseDefaultCredentials { get { throw null; } set { } }
public virtual void Abort() { }
public virtual System.IAsyncResult BeginGetRequestStream(System.AsyncCallback? callback, object? state) { throw null; }
public virtual System.IAsyncResult BeginGetResponse(System.AsyncCallback? callback, object? state) { throw null; }
[System.ObsoleteAttribute("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.", DiagnosticId = "SYSLIB0014", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static System.Net.WebRequest Create(string requestUriString) { throw null; }
[System.ObsoleteAttribute("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.", DiagnosticId = "SYSLIB0014", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static System.Net.WebRequest Create(System.Uri requestUri) { throw null; }
[System.ObsoleteAttribute("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.", DiagnosticId = "SYSLIB0014", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static System.Net.WebRequest CreateDefault(System.Uri requestUri) { throw null; }
[System.ObsoleteAttribute("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.", DiagnosticId = "SYSLIB0014", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static System.Net.HttpWebRequest CreateHttp(string requestUriString) { throw null; }
[System.ObsoleteAttribute("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.", DiagnosticId = "SYSLIB0014", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static System.Net.HttpWebRequest CreateHttp(System.Uri requestUri) { throw null; }
public virtual System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult) { throw null; }
public virtual System.Net.WebResponse EndGetResponse(System.IAsyncResult asyncResult) { throw null; }
[System.ObsoleteAttribute("Serialization has been deprecated for WebRequest.")]
protected virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public virtual System.IO.Stream GetRequestStream() { throw null; }
public virtual System.Threading.Tasks.Task<System.IO.Stream> GetRequestStreamAsync() { throw null; }
public virtual System.Net.WebResponse GetResponse() { throw null; }
public virtual System.Threading.Tasks.Task<System.Net.WebResponse> GetResponseAsync() { throw null; }
public static System.Net.IWebProxy GetSystemWebProxy() { throw null; }
public static bool RegisterPrefix(string prefix, System.Net.IWebRequestCreate creator) { throw null; }
[System.ObsoleteAttribute("Serialization has been deprecated for WebRequest.")]
void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
}
public static partial class WebRequestMethods
{
public static partial class File
{
public const string DownloadFile = "GET";
public const string UploadFile = "PUT";
}
public static partial class Ftp
{
public const string AppendFile = "APPE";
public const string DeleteFile = "DELE";
public const string DownloadFile = "RETR";
public const string GetDateTimestamp = "MDTM";
public const string GetFileSize = "SIZE";
public const string ListDirectory = "NLST";
public const string ListDirectoryDetails = "LIST";
public const string MakeDirectory = "MKD";
public const string PrintWorkingDirectory = "PWD";
public const string RemoveDirectory = "RMD";
public const string Rename = "RENAME";
public const string UploadFile = "STOR";
public const string UploadFileWithUniqueName = "STOU";
}
public static partial class Http
{
public const string Connect = "CONNECT";
public const string Get = "GET";
public const string Head = "HEAD";
public const string MkCol = "MKCOL";
public const string Post = "POST";
public const string Put = "PUT";
}
}
public abstract partial class WebResponse : System.MarshalByRefObject, System.IDisposable, System.Runtime.Serialization.ISerializable
{
protected WebResponse() { }
[System.ObsoleteAttribute("Serialization has been deprecated for WebResponse.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
protected WebResponse(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public virtual long ContentLength { get { throw null; } set { } }
public virtual string ContentType { get { throw null; } set { } }
public virtual System.Net.WebHeaderCollection Headers { get { throw null; } }
public virtual bool IsFromCache { get { throw null; } }
public virtual bool IsMutuallyAuthenticated { get { throw null; } }
public virtual System.Uri ResponseUri { get { throw null; } }
public virtual bool SupportsHeaders { get { throw null; } }
public virtual void Close() { }
public void Dispose() { }
protected virtual void Dispose(bool disposing) { }
[System.ObsoleteAttribute("Serialization has been deprecated for WebResponse.")]
protected virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public virtual System.IO.Stream GetResponseStream() { throw null; }
[System.ObsoleteAttribute("Serialization has been deprecated for WebResponse.")]
void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
}
public delegate System.Net.IPEndPoint BindIPEndPoint(System.Net.ServicePoint servicePoint, System.Net.IPEndPoint remoteEndPoint, int retryCount);
[System.FlagsAttribute]
public enum SecurityProtocolType
{
SystemDefault = 0,
[System.ObsoleteAttribute("SecurityProtocolType.Ssl3 has been deprecated and is not supported.")]
Ssl3 = 48,
Tls = 192,
Tls11 = 768,
Tls12 = 3072,
Tls13 = 12288,
}
public partial class ServicePoint
{
internal ServicePoint() { }
public System.Uri Address { get { throw null; } }
public System.Net.BindIPEndPoint? BindIPEndPointDelegate { get { throw null; } set { } }
public System.Security.Cryptography.X509Certificates.X509Certificate? Certificate { get { throw null; } }
public System.Security.Cryptography.X509Certificates.X509Certificate? ClientCertificate { get { throw null; } }
public int ConnectionLeaseTimeout { get { throw null; } set { } }
public int ConnectionLimit { get { throw null; } set { } }
public string ConnectionName { get { throw null; } }
public int CurrentConnections { get { throw null; } }
public bool Expect100Continue { get { throw null; } set { } }
public System.DateTime IdleSince { get { throw null; } }
public int MaxIdleTime { get { throw null; } set { } }
public virtual System.Version ProtocolVersion { get { throw null; } }
public int ReceiveBufferSize { get { throw null; } set { } }
public bool SupportsPipelining { get { throw null; } }
public bool UseNagleAlgorithm { get { throw null; } set { } }
public bool CloseConnectionGroup(string connectionGroupName) { throw null; }
public void SetTcpKeepAlive(bool enabled, int keepAliveTime, int keepAliveInterval) { }
}
public partial class ServicePointManager
{
internal ServicePointManager() { }
public const int DefaultNonPersistentConnectionLimit = 4;
public const int DefaultPersistentConnectionLimit = 2;
public static bool CheckCertificateRevocationList { get { throw null; } set { } }
public static int DefaultConnectionLimit { get { throw null; } set { } }
public static int DnsRefreshTimeout { get { throw null; } set { } }
public static bool EnableDnsRoundRobin { get { throw null; } set { } }
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Net.Security.EncryptionPolicy EncryptionPolicy { get { throw null; } }
public static bool Expect100Continue { get { throw null; } set { } }
public static int MaxServicePointIdleTime { get { throw null; } set { } }
public static int MaxServicePoints { get { throw null; } set { } }
public static bool ReusePort { get { throw null; } set { } }
public static System.Net.SecurityProtocolType SecurityProtocol { get { throw null; } set { } }
public static System.Net.Security.RemoteCertificateValidationCallback? ServerCertificateValidationCallback { get { throw null; } set { } }
public static bool UseNagleAlgorithm { get { throw null; } set { } }
[System.ObsoleteAttribute("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.", DiagnosticId = "SYSLIB0014", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static System.Net.ServicePoint FindServicePoint(string uriString, System.Net.IWebProxy? proxy) { throw null; }
[System.ObsoleteAttribute("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.", DiagnosticId = "SYSLIB0014", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static System.Net.ServicePoint FindServicePoint(System.Uri address) { throw null; }
[System.ObsoleteAttribute("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.", DiagnosticId = "SYSLIB0014", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static System.Net.ServicePoint FindServicePoint(System.Uri address, System.Net.IWebProxy? proxy) { throw null; }
public static void SetTcpKeepAlive(bool enabled, int keepAliveTime, int keepAliveInterval) { }
}
}
namespace System.Net.Cache
{
public enum HttpCacheAgeControl
{
None = 0,
MinFresh = 1,
MaxAge = 2,
MaxAgeAndMinFresh = 3,
MaxStale = 4,
MaxAgeAndMaxStale = 6,
}
public enum HttpRequestCacheLevel
{
Default = 0,
BypassCache = 1,
CacheOnly = 2,
CacheIfAvailable = 3,
Revalidate = 4,
Reload = 5,
NoCacheNoStore = 6,
CacheOrNextCacheOnly = 7,
Refresh = 8,
}
public partial class HttpRequestCachePolicy : System.Net.Cache.RequestCachePolicy
{
public HttpRequestCachePolicy() { }
public HttpRequestCachePolicy(System.DateTime cacheSyncDate) { }
public HttpRequestCachePolicy(System.Net.Cache.HttpCacheAgeControl cacheAgeControl, System.TimeSpan ageOrFreshOrStale) { }
public HttpRequestCachePolicy(System.Net.Cache.HttpCacheAgeControl cacheAgeControl, System.TimeSpan maxAge, System.TimeSpan freshOrStale) { }
public HttpRequestCachePolicy(System.Net.Cache.HttpCacheAgeControl cacheAgeControl, System.TimeSpan maxAge, System.TimeSpan freshOrStale, System.DateTime cacheSyncDate) { }
public HttpRequestCachePolicy(System.Net.Cache.HttpRequestCacheLevel level) { }
public System.DateTime CacheSyncDate { get { throw null; } }
public new System.Net.Cache.HttpRequestCacheLevel Level { get { throw null; } }
public System.TimeSpan MaxAge { get { throw null; } }
public System.TimeSpan MaxStale { get { throw null; } }
public System.TimeSpan MinFresh { get { throw null; } }
public override string ToString() { throw null; }
}
}