Class WebRequestOptions
Holds options that should be applied to web requests.
Inheritance
Inherited Members
Namespace: Argotic.Common
Assembly: Argotic.Common.dll
Syntax
[Serializable]
public class WebRequestOptions
Constructors
| Improve this Doc View SourceWebRequestOptions()
Initializes a new instance of the WebRequestOptions class.
Declaration
public WebRequestOptions()
WebRequestOptions(ICredentials)
Initializes a new instance of the WebRequestOptions class using the specified System.Net.ICredentials.
Declaration
public WebRequestOptions(ICredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
System.Net.ICredentials | credentials | A System.Net.ICredentials that provides the proper set of credentials to the source resource when required. This value can be null. |
WebRequestOptions(ICredentials, IWebProxy)
Initializes a new instance of the WebRequestOptions class using the specified System.Net.ICredentials and System.Net.IWebProxy.
Declaration
public WebRequestOptions(ICredentials credentials, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
System.Net.ICredentials | credentials | A System.Net.ICredentials that provides the proper set of credentials to the source resource when required. This value can be null. |
System.Net.IWebProxy | proxy | A System.Net.IWebProxy that provides proxy access to the source resource when required. This value can be null. |
Properties
| Improve this Doc View SourceAccept
Gets or sets the value of the Accept HTTP header.
Declaration
public string Accept { get; set; }
Property Value
Type | Description |
---|---|
System.String |
AllowAutoRedirect
Gets or sets a value that indicates whether the request should follow redirection responses.
Declaration
public bool? AllowAutoRedirect { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
AllowWriteStreamBuffering
Gets or sets a value that indicates whether to buffer the data sent to the Internet resource.
Declaration
public bool? AllowWriteStreamBuffering { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
AuthenticationLevel
Gets or sets values indicating the level of authentication and impersonation used for this request.
Declaration
public AuthenticationLevel? AuthenticationLevel { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Net.Security.AuthenticationLevel> |
AutomaticDecompression
Gets or sets the type of decompression that is used.
Declaration
public DecompressionMethods? AutomaticDecompression { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Net.DecompressionMethods> |
CachePolicy
Gets or sets the cache policy for this request.
Declaration
public RequestCachePolicy CachePolicy { get; set; }
Property Value
Type | Description |
---|---|
System.Net.Cache.RequestCachePolicy |
ClientCertificates
Gets or sets the collection of security certificates that are associated with this request.
Declaration
public X509CertificateCollection ClientCertificates { get; set; }
Property Value
Type | Description |
---|---|
System.Security.Cryptography.X509Certificates.X509CertificateCollection |
Connection
Gets or sets the value of the Connection HTTP header.
Declaration
public string Connection { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ConnectionGroupName
Gets or sets the name of the connection group for the request.
Declaration
public string ConnectionGroupName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ContentOffset
Gets or sets a byte offset into the file being downloaded by this request.
Declaration
public long? ContentOffset { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> |
ContinueDelegate
Gets or sets the delegate method called when an HTTP 100-continue response is received from the Internet resource.
Declaration
public HttpContinueDelegate ContinueDelegate { get; set; }
Property Value
Type | Description |
---|---|
System.Net.HttpContinueDelegate |
CookieContainer
Gets or sets the cookies associated with the request.
Declaration
public CookieContainer CookieContainer { get; set; }
Property Value
Type | Description |
---|---|
System.Net.CookieContainer |
Credentials
Gets or sets the network credentials used for authenticating the request with the Internet resource.
Declaration
public ICredentials Credentials { get; set; }
Property Value
Type | Description |
---|---|
System.Net.ICredentials |
EnableSsl
Gets or sets a System.Boolean that specifies that an SSL connection should be used.
Declaration
public bool? EnableSsl { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
Expect
Gets or sets the value of the Expect HTTP header.
Declaration
public string Expect { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Headers
Gets or sets the collection of header name/value pairs associated with the request.
Declaration
public WebHeaderCollection Headers { get; set; }
Property Value
Type | Description |
---|---|
System.Net.WebHeaderCollection |
ImpersonationLevel
Gets or sets the impersonation level for the current request.
Declaration
public TokenImpersonationLevel? ImpersonationLevel { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Security.Principal.TokenImpersonationLevel> |
KeepAlive
Gets or sets a value that indicates whether to make a persistent connection to the Internet resource.
Declaration
public bool? KeepAlive { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
MaximumAutomaticRedirections
Gets or sets the maximum number of redirects that the request follows.
Declaration
public int? MaximumAutomaticRedirections { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
MaximumResponseHeadersLength
Gets or sets the maximum allowed length of the response headers.
Declaration
public int? MaximumResponseHeadersLength { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
MediaType
Gets or sets the media type of the request.
Declaration
public string MediaType { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Pipelined
Gets or sets a value that indicates whether to pipeline the request to the Internet resource.
Declaration
public bool? Pipelined { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
PreAuthenticate
Indicates whether to pre-authenticate the request.
Declaration
public bool? PreAuthenticate { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
ProtocolVersion
Gets or sets the version of HTTP to use for the request.
Declaration
public Version ProtocolVersion { get; set; }
Property Value
Type | Description |
---|---|
System.Version |
Proxy
Gets or sets the network proxy to use to access this Internet resource.
Declaration
public IWebProxy Proxy { get; set; }
Property Value
Type | Description |
---|---|
System.Net.IWebProxy |
ReadWriteTimeout
Gets or sets a time-out when writing to or reading from a stream.
Declaration
public int? ReadWriteTimeout { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
Referer
Gets or sets the value of the Referer HTTP header.
Declaration
public string Referer { get; set; }
Property Value
Type | Description |
---|---|
System.String |
RenameTo
Gets or sets the new name of a file being renamed.
Declaration
public string RenameTo { get; set; }
Property Value
Type | Description |
---|---|
System.String |
SendChunked
Gets or sets a value that indicates whether to send data in segments to the Internet resource.
Declaration
public bool? SendChunked { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
Timeout
Gets or sets the length of time before the request times out.
Declaration
public int? Timeout { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
TransferEncoding
Gets or sets the value of the Transfer-encoding HTTP header.
Declaration
public string TransferEncoding { get; set; }
Property Value
Type | Description |
---|---|
System.String |
UnsafeAuthenticatedConnectionSharing
Gets or sets a value that indicates whether to allow high-speed NTLM-authenticated connection sharing.
Declaration
public bool? UnsafeAuthenticatedConnectionSharing { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
UseBinary
Gets or sets a System.Boolean value that specifies the data type for file transfers.
Declaration
public bool? UseBinary { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
UseDefaultCredentials
Gets or sets a System.Boolean value that controls whether System.Net.CredentialCache.DefaultCredentials are sent with requests.
Declaration
public bool? UseDefaultCredentials { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
UsePassive
Gets or sets the behavior of a client application's data transfer process.
Declaration
public bool? UsePassive { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
UserAgent
Gets or sets the value of the User-agent HTTP header.
Declaration
public string UserAgent { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceApplyOptions(WebRequest)
Applies all options on the current instance to the supplied System.Net.WebRequest.
Declaration
public void ApplyOptions(WebRequest request)
Parameters
Type | Name | Description |
---|---|---|
System.Net.WebRequest | request | A System.Net.WebRequest that should be configured. |