C# 클래스 CsQuery.Web.CsqWebRequest

A CsqWebRequest object manages data and state related to a WebRequest
상속: ICsqWebRequest
파일 보기 프로젝트 열기: prepare/HTML-Renderer 1 사용 예제들

공개 메소드들

메소드 설명
CsqWebRequest ( string url ) : System

Creates a new CsqWebRequest for a given URL using the default IHttpWebRequestFactory.

CsqWebRequest ( string url, IHttpWebRequestFactory webRequestFactory ) : System

Creates a new CsqWebRequest for a URL using the provided IHttpWebRequestFactory. (Usually, you should use the default constructor, unless replacing the .NET framework HttpWebRequest object for testing or some other purpose)

Get ( ) : string

Get the HTML using a synchronous HTTP request. This will return a string using the encoding specified by the MIME type. If the document uses an encoding specified in a content-type header, it will NOT be reflected by the results of this method.

Get ( IHttpWebRequest request ) : string

Initiate a synchronous GET request from an existing IHttpWebRequest object

GetAsync ( Action success, Action fail ) : ManualResetEvent

Initiates an asynchronous GET request.

GetAsync ( IHttpWebRequest request, Action success, Action fail ) : ManualResetEvent

Initiates an asynchronous GET request from an IHttpWebRequest object.

GetEncoding ( IHttpWebResponse response ) : Encoding

Return the character set encoding for an IHttpWebResponse, or null if no encoding is specified.

GetWebRequest ( ) : IHttpWebRequest

Gets a new HttpWebRequest object for the URL bound to this CsqWebRequest.

Post ( ) : string

Initiate an http POST request.

Post ( string url ) : string

Initiate an http POST request.

Post ( string url, string>.IEnumerable postData ) : string

Initiate an http POST request.

보호된 메소드들

메소드 설명
GetResponseStreamReader ( IHttpWebRequest request ) : StreamReader

Gets response stream from a webrequest using the correct encoding. If the encoding is not specified, then the encoding will be detected from the BOM.

비공개 메소드들

메소드 설명
ApplyOptions ( IHttpWebRequest request ) : void

메소드 상세

CsqWebRequest() 공개 메소드

Creates a new CsqWebRequest for a given URL using the default IHttpWebRequestFactory.
public CsqWebRequest ( string url ) : System
url string /// URL of the document. ///
리턴 System

CsqWebRequest() 공개 메소드

Creates a new CsqWebRequest for a URL using the provided IHttpWebRequestFactory. (Usually, you should use the default constructor, unless replacing the .NET framework HttpWebRequest object for testing or some other purpose)
public CsqWebRequest ( string url, IHttpWebRequestFactory webRequestFactory ) : System
url string /// URL of the document. ///
webRequestFactory IHttpWebRequestFactory /// The web request factory. ///
리턴 System

Get() 공개 메소드

Get the HTML using a synchronous HTTP request. This will return a string using the encoding specified by the MIME type. If the document uses an encoding specified in a content-type header, it will NOT be reflected by the results of this method.
public Get ( ) : string
리턴 string

Get() 공개 메소드

Initiate a synchronous GET request from an existing IHttpWebRequest object
public Get ( IHttpWebRequest request ) : string
request IHttpWebRequest /// The request. ///
리턴 string

GetAsync() 공개 메소드

Initiates an asynchronous GET request.
public GetAsync ( Action success, Action fail ) : ManualResetEvent
success Action /// A delegate that will be invoked with the response data structure upon successful resolution /// of the request. ///
fail Action /// A delegate that will be invoked with the response data structure upon failure. ///
리턴 System.Threading.ManualResetEvent

GetAsync() 공개 메소드

Initiates an asynchronous GET request from an IHttpWebRequest object.
public GetAsync ( IHttpWebRequest request, Action success, Action fail ) : ManualResetEvent
request IHttpWebRequest /// The request. ///
success Action /// A delegate that will be invoked with the response data structure upon successful resolution /// of the request. ///
fail Action /// A delegate that will be invoked with the response data structure upon failure. ///
리턴 System.Threading.ManualResetEvent

GetEncoding() 공개 정적인 메소드

Return the character set encoding for an IHttpWebResponse, or null if no encoding is specified.
public static GetEncoding ( IHttpWebResponse response ) : Encoding
response IHttpWebResponse /// The response. ///
리턴 System.Text.Encoding

GetResponseStreamReader() 보호된 메소드

Gets response stream from a webrequest using the correct encoding. If the encoding is not specified, then the encoding will be detected from the BOM.
protected GetResponseStreamReader ( IHttpWebRequest request ) : StreamReader
request IHttpWebRequest /// The request. ///
리턴 System.IO.StreamReader

GetWebRequest() 공개 메소드

Gets a new HttpWebRequest object for the URL bound to this CsqWebRequest.
public GetWebRequest ( ) : IHttpWebRequest
리턴 IHttpWebRequest

Post() 공개 메소드

Initiate an http POST request.
public Post ( ) : string
리턴 string

Post() 공개 메소드

Initiate an http POST request.
public Post ( string url ) : string
url string /// URL of the document. ///
리턴 string

Post() 공개 메소드

Initiate an http POST request.
public Post ( string url, string>.IEnumerable postData ) : string
url string /// URL of the document. ///
postData string>.IEnumerable /// The information describing the post data to be sent this request. ///
리턴 string