C# Class System.Net.WebClient

Mostra file Open project: dotnet/corefx Class Usage Examples

Private Properties

Property Type Description
OnWriteStreamClosed void

Public Methods

Method Description
CancelAsync ( ) : void
DownloadData ( System address ) : byte[]
DownloadData ( string address ) : byte[]
DownloadDataAsync ( System address ) : void
DownloadDataAsync ( System address, object userToken ) : void
DownloadDataTaskAsync ( System address ) : System.Threading.Tasks.Task
DownloadDataTaskAsync ( string address ) : System.Threading.Tasks.Task
DownloadFile ( System address, string fileName ) : void
DownloadFile ( string address, string fileName ) : void
DownloadFileAsync ( System address, string fileName ) : void
DownloadFileAsync ( System address, string fileName, object userToken ) : void
DownloadFileTaskAsync ( System address, string fileName ) : System.Threading.Tasks.Task
DownloadFileTaskAsync ( string address, string fileName ) : System.Threading.Tasks.Task
DownloadString ( System address ) : string
DownloadString ( string address ) : string
DownloadStringAsync ( System address ) : void
DownloadStringAsync ( System address, object userToken ) : void
DownloadStringTaskAsync ( System address ) : System.Threading.Tasks.Task
DownloadStringTaskAsync ( string address ) : System.Threading.Tasks.Task
OpenRead ( System address ) : System.IO.Stream
OpenRead ( string address ) : System.IO.Stream
OpenReadAsync ( System address ) : void
OpenReadAsync ( System address, object userToken ) : void
OpenReadTaskAsync ( System address ) : System.Threading.Tasks.Task
OpenReadTaskAsync ( string address ) : System.Threading.Tasks.Task
OpenWrite ( System address ) : System.IO.Stream
OpenWrite ( System address, string method ) : System.IO.Stream
OpenWrite ( string address ) : System.IO.Stream
OpenWrite ( string address, string method ) : System.IO.Stream
OpenWriteAsync ( System address ) : void
OpenWriteAsync ( System address, string method ) : void
OpenWriteAsync ( System address, string method, object userToken ) : void
OpenWriteTaskAsync ( System address ) : System.Threading.Tasks.Task
OpenWriteTaskAsync ( System address, string method ) : System.Threading.Tasks.Task
OpenWriteTaskAsync ( string address ) : System.Threading.Tasks.Task
OpenWriteTaskAsync ( string address, string method ) : System.Threading.Tasks.Task
UploadData ( System address, byte data ) : byte[]
UploadData ( System address, string method, byte data ) : byte[]
UploadData ( string address, byte data ) : byte[]
UploadData ( string address, string method, byte data ) : byte[]
UploadDataAsync ( System address, byte data ) : void
UploadDataAsync ( System address, string method, byte data ) : void
UploadDataAsync ( System address, string method, byte data, object userToken ) : void
UploadDataTaskAsync ( System address, byte data ) : System.Threading.Tasks.Task
UploadDataTaskAsync ( System address, string method, byte data ) : System.Threading.Tasks.Task
UploadDataTaskAsync ( string address, byte data ) : System.Threading.Tasks.Task
UploadDataTaskAsync ( string address, string method, byte data ) : System.Threading.Tasks.Task
UploadFile ( System address, string fileName ) : byte[]
UploadFile ( System address, string method, string fileName ) : byte[]
UploadFile ( string address, string fileName ) : byte[]
UploadFile ( string address, string method, string fileName ) : byte[]
UploadFileAsync ( System address, string fileName ) : void
UploadFileAsync ( System address, string method, string fileName ) : void
UploadFileAsync ( System address, string method, string fileName, object userToken ) : void
UploadFileTaskAsync ( System address, string fileName ) : System.Threading.Tasks.Task
UploadFileTaskAsync ( System address, string method, string fileName ) : System.Threading.Tasks.Task
UploadFileTaskAsync ( string address, string fileName ) : System.Threading.Tasks.Task
UploadFileTaskAsync ( string address, string method, string fileName ) : System.Threading.Tasks.Task
UploadString ( System address, string data ) : string
UploadString ( System address, string method, string data ) : string
UploadString ( string address, string data ) : string
UploadString ( string address, string method, string data ) : string
UploadStringAsync ( System address, string data ) : void
UploadStringAsync ( System address, string method, string data ) : void
UploadStringAsync ( System address, string method, string data, object userToken ) : void
UploadStringTaskAsync ( System address, string data ) : System.Threading.Tasks.Task
UploadStringTaskAsync ( System address, string method, string data ) : System.Threading.Tasks.Task
UploadStringTaskAsync ( string address, string data ) : System.Threading.Tasks.Task
UploadStringTaskAsync ( string address, string method, string data ) : System.Threading.Tasks.Task
UploadValues ( System address, System data ) : byte[]
UploadValues ( System address, string method, System data ) : byte[]
UploadValues ( string address, System data ) : byte[]
UploadValues ( string address, string method, System data ) : byte[]
UploadValuesAsync ( System address, System data ) : void
UploadValuesAsync ( System address, string method, System data ) : void
UploadValuesAsync ( System address, string method, System data, object userToken ) : void
UploadValuesTaskAsync ( System address, System data ) : System.Threading.Tasks.Task
UploadValuesTaskAsync ( System address, string method, System data ) : System.Threading.Tasks.Task
UploadValuesTaskAsync ( string address, System data ) : System.Threading.Tasks.Task
UploadValuesTaskAsync ( string address, string method, System data ) : System.Threading.Tasks.Task
WebClient ( )

Protected Methods

Method Description
GetWebRequest ( System address ) : System.Net.WebRequest
GetWebResponse ( System request ) : System.Net.WebResponse
GetWebResponse ( System request, System result ) : System.Net.WebResponse
OnDownloadDataCompleted ( System e ) : void
OnDownloadFileCompleted ( System e ) : void
OnDownloadProgressChanged ( System e ) : void
OnDownloadStringCompleted ( System e ) : void
OnOpenReadCompleted ( System e ) : void
OnOpenWriteCompleted ( System e ) : void
OnUploadDataCompleted ( System e ) : void
OnUploadFileCompleted ( System e ) : void
OnUploadProgressChanged ( System e ) : void
OnUploadStringCompleted ( System e ) : void
OnUploadValuesCompleted ( System e ) : void

Private Methods

Method Description
OnWriteStreamClosed ( System e ) : void

Method Details

CancelAsync() public method

public CancelAsync ( ) : void
return void

DownloadData() public method

public DownloadData ( System address ) : byte[]
address System
return byte[]

DownloadData() public method

public DownloadData ( string address ) : byte[]
address string
return byte[]

DownloadDataAsync() public method

public DownloadDataAsync ( System address ) : void
address System
return void

DownloadDataAsync() public method

public DownloadDataAsync ( System address, object userToken ) : void
address System
userToken object
return void

DownloadDataTaskAsync() public method

public DownloadDataTaskAsync ( System address ) : System.Threading.Tasks.Task
address System
return System.Threading.Tasks.Task

DownloadDataTaskAsync() public method

public DownloadDataTaskAsync ( string address ) : System.Threading.Tasks.Task
address string
return System.Threading.Tasks.Task

DownloadFile() public method

public DownloadFile ( System address, string fileName ) : void
address System
fileName string
return void

DownloadFile() public method

public DownloadFile ( string address, string fileName ) : void
address string
fileName string
return void

DownloadFileAsync() public method

public DownloadFileAsync ( System address, string fileName ) : void
address System
fileName string
return void

DownloadFileAsync() public method

public DownloadFileAsync ( System address, string fileName, object userToken ) : void
address System
fileName string
userToken object
return void

DownloadFileTaskAsync() public method

public DownloadFileTaskAsync ( System address, string fileName ) : System.Threading.Tasks.Task
address System
fileName string
return System.Threading.Tasks.Task

DownloadFileTaskAsync() public method

public DownloadFileTaskAsync ( string address, string fileName ) : System.Threading.Tasks.Task
address string
fileName string
return System.Threading.Tasks.Task

DownloadString() public method

public DownloadString ( System address ) : string
address System
return string

DownloadString() public method

public DownloadString ( string address ) : string
address string
return string

DownloadStringAsync() public method

public DownloadStringAsync ( System address ) : void
address System
return void

DownloadStringAsync() public method

public DownloadStringAsync ( System address, object userToken ) : void
address System
userToken object
return void

DownloadStringTaskAsync() public method

public DownloadStringTaskAsync ( System address ) : System.Threading.Tasks.Task
address System
return System.Threading.Tasks.Task

DownloadStringTaskAsync() public method

public DownloadStringTaskAsync ( string address ) : System.Threading.Tasks.Task
address string
return System.Threading.Tasks.Task

GetWebRequest() protected method

protected GetWebRequest ( System address ) : System.Net.WebRequest
address System
return System.Net.WebRequest

GetWebResponse() protected method

protected GetWebResponse ( System request ) : System.Net.WebResponse
request System
return System.Net.WebResponse

GetWebResponse() protected method

protected GetWebResponse ( System request, System result ) : System.Net.WebResponse
request System
result System
return System.Net.WebResponse

OnDownloadDataCompleted() protected method

protected OnDownloadDataCompleted ( System e ) : void
e System
return void

OnDownloadFileCompleted() protected method

protected OnDownloadFileCompleted ( System e ) : void
e System
return void

OnDownloadProgressChanged() protected method

protected OnDownloadProgressChanged ( System e ) : void
e System
return void

OnDownloadStringCompleted() protected method

protected OnDownloadStringCompleted ( System e ) : void
e System
return void

OnOpenReadCompleted() protected method

protected OnOpenReadCompleted ( System e ) : void
e System
return void

OnOpenWriteCompleted() protected method

protected OnOpenWriteCompleted ( System e ) : void
e System
return void

OnUploadDataCompleted() protected method

protected OnUploadDataCompleted ( System e ) : void
e System
return void

OnUploadFileCompleted() protected method

protected OnUploadFileCompleted ( System e ) : void
e System
return void

OnUploadProgressChanged() protected method

protected OnUploadProgressChanged ( System e ) : void
e System
return void

OnUploadStringCompleted() protected method

protected OnUploadStringCompleted ( System e ) : void
e System
return void

OnUploadValuesCompleted() protected method

protected OnUploadValuesCompleted ( System e ) : void
e System
return void

OpenRead() public method

public OpenRead ( System address ) : System.IO.Stream
address System
return System.IO.Stream

OpenRead() public method

public OpenRead ( string address ) : System.IO.Stream
address string
return System.IO.Stream

OpenReadAsync() public method

public OpenReadAsync ( System address ) : void
address System
return void

OpenReadAsync() public method

public OpenReadAsync ( System address, object userToken ) : void
address System
userToken object
return void

OpenReadTaskAsync() public method

public OpenReadTaskAsync ( System address ) : System.Threading.Tasks.Task
address System
return System.Threading.Tasks.Task

OpenReadTaskAsync() public method

public OpenReadTaskAsync ( string address ) : System.Threading.Tasks.Task
address string
return System.Threading.Tasks.Task

OpenWrite() public method

public OpenWrite ( System address ) : System.IO.Stream
address System
return System.IO.Stream

OpenWrite() public method

public OpenWrite ( System address, string method ) : System.IO.Stream
address System
method string
return System.IO.Stream

OpenWrite() public method

public OpenWrite ( string address ) : System.IO.Stream
address string
return System.IO.Stream

OpenWrite() public method

public OpenWrite ( string address, string method ) : System.IO.Stream
address string
method string
return System.IO.Stream

OpenWriteAsync() public method

public OpenWriteAsync ( System address ) : void
address System
return void

OpenWriteAsync() public method

public OpenWriteAsync ( System address, string method ) : void
address System
method string
return void

OpenWriteAsync() public method

public OpenWriteAsync ( System address, string method, object userToken ) : void
address System
method string
userToken object
return void

OpenWriteTaskAsync() public method

public OpenWriteTaskAsync ( System address ) : System.Threading.Tasks.Task
address System
return System.Threading.Tasks.Task

OpenWriteTaskAsync() public method

public OpenWriteTaskAsync ( System address, string method ) : System.Threading.Tasks.Task
address System
method string
return System.Threading.Tasks.Task

OpenWriteTaskAsync() public method

public OpenWriteTaskAsync ( string address ) : System.Threading.Tasks.Task
address string
return System.Threading.Tasks.Task

OpenWriteTaskAsync() public method

public OpenWriteTaskAsync ( string address, string method ) : System.Threading.Tasks.Task
address string
method string
return System.Threading.Tasks.Task

UploadData() public method

public UploadData ( System address, byte data ) : byte[]
address System
data byte
return byte[]

UploadData() public method

public UploadData ( System address, string method, byte data ) : byte[]
address System
method string
data byte
return byte[]

UploadData() public method

public UploadData ( string address, byte data ) : byte[]
address string
data byte
return byte[]

UploadData() public method

public UploadData ( string address, string method, byte data ) : byte[]
address string
method string
data byte
return byte[]

UploadDataAsync() public method

public UploadDataAsync ( System address, byte data ) : void
address System
data byte
return void

UploadDataAsync() public method

public UploadDataAsync ( System address, string method, byte data ) : void
address System
method string
data byte
return void

UploadDataAsync() public method

public UploadDataAsync ( System address, string method, byte data, object userToken ) : void
address System
method string
data byte
userToken object
return void

UploadDataTaskAsync() public method

public UploadDataTaskAsync ( System address, byte data ) : System.Threading.Tasks.Task
address System
data byte
return System.Threading.Tasks.Task

UploadDataTaskAsync() public method

public UploadDataTaskAsync ( System address, string method, byte data ) : System.Threading.Tasks.Task
address System
method string
data byte
return System.Threading.Tasks.Task

UploadDataTaskAsync() public method

public UploadDataTaskAsync ( string address, byte data ) : System.Threading.Tasks.Task
address string
data byte
return System.Threading.Tasks.Task

UploadDataTaskAsync() public method

public UploadDataTaskAsync ( string address, string method, byte data ) : System.Threading.Tasks.Task
address string
method string
data byte
return System.Threading.Tasks.Task

UploadFile() public method

public UploadFile ( System address, string fileName ) : byte[]
address System
fileName string
return byte[]

UploadFile() public method

public UploadFile ( System address, string method, string fileName ) : byte[]
address System
method string
fileName string
return byte[]

UploadFile() public method

public UploadFile ( string address, string fileName ) : byte[]
address string
fileName string
return byte[]

UploadFile() public method

public UploadFile ( string address, string method, string fileName ) : byte[]
address string
method string
fileName string
return byte[]

UploadFileAsync() public method

public UploadFileAsync ( System address, string fileName ) : void
address System
fileName string
return void

UploadFileAsync() public method

public UploadFileAsync ( System address, string method, string fileName ) : void
address System
method string
fileName string
return void

UploadFileAsync() public method

public UploadFileAsync ( System address, string method, string fileName, object userToken ) : void
address System
method string
fileName string
userToken object
return void

UploadFileTaskAsync() public method

public UploadFileTaskAsync ( System address, string fileName ) : System.Threading.Tasks.Task
address System
fileName string
return System.Threading.Tasks.Task

UploadFileTaskAsync() public method

public UploadFileTaskAsync ( System address, string method, string fileName ) : System.Threading.Tasks.Task
address System
method string
fileName string
return System.Threading.Tasks.Task

UploadFileTaskAsync() public method

public UploadFileTaskAsync ( string address, string fileName ) : System.Threading.Tasks.Task
address string
fileName string
return System.Threading.Tasks.Task

UploadFileTaskAsync() public method

public UploadFileTaskAsync ( string address, string method, string fileName ) : System.Threading.Tasks.Task
address string
method string
fileName string
return System.Threading.Tasks.Task

UploadString() public method

public UploadString ( System address, string data ) : string
address System
data string
return string

UploadString() public method

public UploadString ( System address, string method, string data ) : string
address System
method string
data string
return string

UploadString() public method

public UploadString ( string address, string data ) : string
address string
data string
return string

UploadString() public method

public UploadString ( string address, string method, string data ) : string
address string
method string
data string
return string

UploadStringAsync() public method

public UploadStringAsync ( System address, string data ) : void
address System
data string
return void

UploadStringAsync() public method

public UploadStringAsync ( System address, string method, string data ) : void
address System
method string
data string
return void

UploadStringAsync() public method

public UploadStringAsync ( System address, string method, string data, object userToken ) : void
address System
method string
data string
userToken object
return void

UploadStringTaskAsync() public method

public UploadStringTaskAsync ( System address, string data ) : System.Threading.Tasks.Task
address System
data string
return System.Threading.Tasks.Task

UploadStringTaskAsync() public method

public UploadStringTaskAsync ( System address, string method, string data ) : System.Threading.Tasks.Task
address System
method string
data string
return System.Threading.Tasks.Task

UploadStringTaskAsync() public method

public UploadStringTaskAsync ( string address, string data ) : System.Threading.Tasks.Task
address string
data string
return System.Threading.Tasks.Task

UploadStringTaskAsync() public method

public UploadStringTaskAsync ( string address, string method, string data ) : System.Threading.Tasks.Task
address string
method string
data string
return System.Threading.Tasks.Task

UploadValues() public method

public UploadValues ( System address, System data ) : byte[]
address System
data System
return byte[]

UploadValues() public method

public UploadValues ( System address, string method, System data ) : byte[]
address System
method string
data System
return byte[]

UploadValues() public method

public UploadValues ( string address, System data ) : byte[]
address string
data System
return byte[]

UploadValues() public method

public UploadValues ( string address, string method, System data ) : byte[]
address string
method string
data System
return byte[]

UploadValuesAsync() public method

public UploadValuesAsync ( System address, System data ) : void
address System
data System
return void

UploadValuesAsync() public method

public UploadValuesAsync ( System address, string method, System data ) : void
address System
method string
data System
return void

UploadValuesAsync() public method

public UploadValuesAsync ( System address, string method, System data, object userToken ) : void
address System
method string
data System
userToken object
return void

UploadValuesTaskAsync() public method

public UploadValuesTaskAsync ( System address, System data ) : System.Threading.Tasks.Task
address System
data System
return System.Threading.Tasks.Task

UploadValuesTaskAsync() public method

public UploadValuesTaskAsync ( System address, string method, System data ) : System.Threading.Tasks.Task
address System
method string
data System
return System.Threading.Tasks.Task

UploadValuesTaskAsync() public method

public UploadValuesTaskAsync ( string address, System data ) : System.Threading.Tasks.Task
address string
data System
return System.Threading.Tasks.Task

UploadValuesTaskAsync() public method

public UploadValuesTaskAsync ( string address, string method, System data ) : System.Threading.Tasks.Task
address string
method string
data System
return System.Threading.Tasks.Task

WebClient() public method

public WebClient ( )