C# Class Nandaka.Common.ExtendedWebClient

Inheritance: System.Net.WebClient
Datei anzeigen Open project: Nandaka/NijieDownloader Class Usage Examples

Public Methods

Method Description
ClearCookie ( ) : void
DownloadData ( string address ) : byte[]
DownloadFile ( string address, string fileName ) : void
DownloadString ( string address ) : string
ExtendedWebClient ( int timeout = -1, CookieContainer cookieJar = null, String userAgent = null ) : System
GetAllCookies ( ) : List

Get All Cookies

OpenRead ( string address ) : Stream
OpenWrite ( string address ) : Stream
OpenWrite ( string address, string method ) : Stream

Protected Methods

Method Description
GetWebRequest ( Uri address ) : WebRequest
GetWebResponse ( WebRequest request ) : WebResponse
GetWebResponse ( WebRequest request, IAsyncResult result ) : WebResponse

Private Methods

Method Description
CreateUri ( string url ) : Uri

enable url ended with '.' taken from http://stackoverflow.com/a/2285321

ReadCookies ( WebResponse r ) : void

Method Details

ClearCookie() public static method

public static ClearCookie ( ) : void
return void

DownloadData() public method

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

DownloadFile() public method

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

DownloadString() public method

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

ExtendedWebClient() public method

public ExtendedWebClient ( int timeout = -1, CookieContainer cookieJar = null, String userAgent = null ) : System
timeout int
cookieJar System.Net.CookieContainer
userAgent String
return System

GetAllCookies() public static method

Get All Cookies
public static GetAllCookies ( ) : List
return List

GetWebRequest() protected method

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

GetWebResponse() protected method

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

GetWebResponse() protected method

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

OpenRead() public method

public OpenRead ( string address ) : Stream
address string
return Stream

OpenWrite() public method

public OpenWrite ( string address ) : Stream
address string
return Stream

OpenWrite() public method

public OpenWrite ( string address, string method ) : Stream
address string
method string
return Stream