C# Class QualityBot.Util.WebRequestClient

A Wrapper for WebClientBase.
Inheritance: WebRequestClientBase
Afficher le fichier Open project: Ancestry/quality-bot Class Usage Examples

Méthodes publiques

Méthode Description
DoGetFile ( string url ) : byte[]

Gets the content from the Url as a byte stream.

DoGetFile ( string url, string filename ) : void

Gets the content from the Url and saves it as the specified file.

DoGetUrl ( string url ) : string

Gets the content from the Url.

DoGetUrl ( string url, string>.Dictionary valuesDictionary ) : string

Gets the content from the Url. Creates the query string from the dictionary provided.

DoGetUrl ( string url, HttpStatusCode &statusCode ) : string

Gets the content from the Url.

DoGetUrl ( string url, HttpStatusCode &statusCode, string &statusDescription ) : string

Gets the content from the Url.

DoGetUrlHeadOnly ( string url ) : Uri

Performs a HEAD request.

DoGetUrlHeadOnly ( string url, HttpStatusCode &statusCode ) : Uri

Performs a HEAD request.

DoGetUrlHeadOnly ( string url, HttpStatusCode &statusCode, string &statusDescription ) : Uri

Performs a HEAD request.

DoGetUrlHtml ( string url ) : HtmlAgilityPack.HtmlDocument

Gets the content from the Url as an Html Agility Pack document.

DoGetUrlXml ( string url ) : XmlDocument

Gets the content from the Url as xml.

DoPost ( string url, string data ) : string

Posts the data to the url provided.

DoPostForm ( string url, string>.Dictionary valuesDictionary ) : string

Posts a form to the Url.

EncodeJson ( string json ) : string

Url encodes json.

WebRequestClient ( ) : System

Initializes a new instance of the WebRequestClient class.

WebRequestClient ( CookieContainer cookies ) : System

Initializes a new instance of the WebRequestClient class.

Private Methods

Méthode Description
WriteFormData ( string>.Dictionary dictionary ) : string

Given a dictionary, creates Form data to be used in a Post.

Method Details

DoGetFile() public méthode

Gets the content from the Url as a byte stream.
public DoGetFile ( string url ) : byte[]
url string The url.
Résultat byte[]

DoGetFile() public méthode

Gets the content from the Url and saves it as the specified file.
public DoGetFile ( string url, string filename ) : void
url string The url.
filename string The filename, absolute or relative.
Résultat void

DoGetUrl() public méthode

Gets the content from the Url.
public DoGetUrl ( string url ) : string
url string The url.
Résultat string

DoGetUrl() public méthode

Gets the content from the Url. Creates the query string from the dictionary provided.
public DoGetUrl ( string url, string>.Dictionary valuesDictionary ) : string
url string The url.
valuesDictionary string>.Dictionary The values dictionary { form key, value }.
Résultat string

DoGetUrl() public méthode

Gets the content from the Url.
public DoGetUrl ( string url, HttpStatusCode &statusCode ) : string
url string The url.
statusCode HttpStatusCode The status code returned.
Résultat string

DoGetUrl() public méthode

Gets the content from the Url.
public DoGetUrl ( string url, HttpStatusCode &statusCode, string &statusDescription ) : string
url string The url.
statusCode HttpStatusCode The status code returned.
statusDescription string The status description.
Résultat string

DoGetUrlHeadOnly() public méthode

Performs a HEAD request.
public DoGetUrlHeadOnly ( string url ) : Uri
url string /// The url. ///
Résultat System.Uri

DoGetUrlHeadOnly() public méthode

Performs a HEAD request.
public DoGetUrlHeadOnly ( string url, HttpStatusCode &statusCode ) : Uri
url string /// The url. ///
statusCode HttpStatusCode /// The status code returned. ///
Résultat System.Uri

DoGetUrlHeadOnly() public méthode

Performs a HEAD request.
public DoGetUrlHeadOnly ( string url, HttpStatusCode &statusCode, string &statusDescription ) : Uri
url string /// The url. ///
statusCode HttpStatusCode /// The status code returned. ///
statusDescription string /// The status description. ///
Résultat System.Uri

DoGetUrlHtml() public méthode

Gets the content from the Url as an Html Agility Pack document.
public DoGetUrlHtml ( string url ) : HtmlAgilityPack.HtmlDocument
url string The url.
Résultat HtmlAgilityPack.HtmlDocument

DoGetUrlXml() public méthode

Gets the content from the Url as xml.
public DoGetUrlXml ( string url ) : XmlDocument
url string The url.
Résultat System.Xml.XmlDocument

DoPost() public méthode

Posts the data to the url provided.
public DoPost ( string url, string data ) : string
url string The url.
data string The data.
Résultat string

DoPostForm() public méthode

Posts a form to the Url.
public DoPostForm ( string url, string>.Dictionary valuesDictionary ) : string
url string The url.
valuesDictionary string>.Dictionary The values dictionary { form key, value }.
Résultat string

EncodeJson() public méthode

Url encodes json.
public EncodeJson ( string json ) : string
json string The json.
Résultat string

WebRequestClient() public méthode

Initializes a new instance of the WebRequestClient class.
public WebRequestClient ( ) : System
Résultat System

WebRequestClient() public méthode

Initializes a new instance of the WebRequestClient class.
public WebRequestClient ( CookieContainer cookies ) : System
cookies System.Net.CookieContainer The cookies.
Résultat System