C# Класс QualityBot.Util.WebRequestClient

A Wrapper for WebClientBase.
Наследование: WebRequestClientBase
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
WriteFormData ( string>.Dictionary dictionary ) : string

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

Описание методов

DoGetFile() публичный Метод

Gets the content from the Url as a byte stream.
public DoGetFile ( string url ) : byte[]
url string The url.
Результат byte[]

DoGetFile() публичный Метод

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.
Результат void

DoGetUrl() публичный Метод

Gets the content from the Url.
public DoGetUrl ( string url ) : string
url string The url.
Результат string

DoGetUrl() публичный Метод

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 }.
Результат string

DoGetUrl() публичный Метод

Gets the content from the Url.
public DoGetUrl ( string url, HttpStatusCode &statusCode ) : string
url string The url.
statusCode HttpStatusCode The status code returned.
Результат string

DoGetUrl() публичный Метод

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.
Результат string

DoGetUrlHeadOnly() публичный Метод

Performs a HEAD request.
public DoGetUrlHeadOnly ( string url ) : Uri
url string /// The url. ///
Результат System.Uri

DoGetUrlHeadOnly() публичный Метод

Performs a HEAD request.
public DoGetUrlHeadOnly ( string url, HttpStatusCode &statusCode ) : Uri
url string /// The url. ///
statusCode HttpStatusCode /// The status code returned. ///
Результат System.Uri

DoGetUrlHeadOnly() публичный Метод

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. ///
Результат System.Uri

DoGetUrlHtml() публичный Метод

Gets the content from the Url as an Html Agility Pack document.
public DoGetUrlHtml ( string url ) : HtmlAgilityPack.HtmlDocument
url string The url.
Результат HtmlAgilityPack.HtmlDocument

DoGetUrlXml() публичный Метод

Gets the content from the Url as xml.
public DoGetUrlXml ( string url ) : XmlDocument
url string The url.
Результат System.Xml.XmlDocument

DoPost() публичный Метод

Posts the data to the url provided.
public DoPost ( string url, string data ) : string
url string The url.
data string The data.
Результат string

DoPostForm() публичный Метод

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 }.
Результат string

EncodeJson() публичный Метод

Url encodes json.
public EncodeJson ( string json ) : string
json string The json.
Результат string

WebRequestClient() публичный Метод

Initializes a new instance of the WebRequestClient class.
public WebRequestClient ( ) : System
Результат System

WebRequestClient() публичный Метод

Initializes a new instance of the WebRequestClient class.
public WebRequestClient ( CookieContainer cookies ) : System
cookies System.Net.CookieContainer The cookies.
Результат System