C# 클래스 Google.Apis.Requests.Request

Request to a service.
Features which are not (yet) supported on SilverLight: - The UserAgent header. - GZip Compression
상속: IRequest
파일 보기 프로젝트 열기: artzub/LoggenCSG

공개 프로퍼티들

프로퍼티 타입 설명
ContentCharset System.Text.Encoding
SupportedHttpMethods ReadOnlyCollection

Private Properties

프로퍼티 타입 설명
AttachBody void
BuildRequest System.Net.HttpWebRequest
CreateWebRequest System.Net.WebRequest
EndAttachBody void
FormatForUserAgent string
GetDefaultETagAction ETagAction
GetErrorResponseHandlers IEnumerable
GetReturnMimeType string
HandleFailedRequest bool
InternalBeginExecuteRequest void
InternalEndExecuteRequest void

공개 메소드들

메소드 설명
CreateRequest ( IService service, IMethod method ) : IRequest

Given an API method, create the appropriate Request for it.

ExecuteRequest ( ) : IResponse

Executes a request given the configuration options supplied.

ExecuteRequestAsync ( Action responseHandler ) : void

Executes the request asynchronously, and calls the specified delegate once done.

HttpMethodHasBody ( string httpMethod ) : bool

Returns true if this http method can have a body.

On ( string rpcName ) : IRequest

The method to call

Request ( ) : System.IO.Compression
Returning ( ReturnType returnType ) : IRequest

Sets the type of data that is expected to be returned from the request. Defaults to Json.

ToString ( ) : string
WithAppName ( string name ) : IRequest

Sets the Application name on the UserAgent String.

WithAuthentication ( IAuthenticator authenticator ) : IRequest

Uses the provided authenticator to add authentication information to this request.

WithBody ( string body ) : IRequest

Uses the string provied as the body of the request.

WithETag ( string etag ) : IRequest

Adds an ETag to this request.

WithETagAction ( ETagAction action ) : IRequest

Sets the ETag-behavior of this request.

WithFields ( string mask ) : IRequest

Specifies the partial field mask of this method. The response of this request will only contain the fields specified in this mask.

WithKey ( string key ) : IRequest

Adds the developer key to this request.

WithParameters ( object>.IDictionary parameters ) : IRequest

Adds the parameters to the request.

WithParameters ( string>.IEnumerable parameters ) : IRequest

Adds the parameters to the request.

WithParameters ( string parameters ) : IRequest

Parses the specified querystring and adds these parameters to the request

WithUserIp ( string userIp ) : IRequest

IP address of the site where the request originates. Use this if you want to enforce per-user limits.

비공개 메소드들

메소드 설명
AttachBody ( WebRequest request, Action onRequestReady ) : void
BuildRequest ( ) : HttpWebRequest
CreateWebRequest ( Action onRequestReady ) : WebRequest
EndAttachBody ( IAsyncResult asyncResult ) : void

Complete the attach-body portion of the request and continue executing the call.

FormatForUserAgent ( string fragment ) : string
GetDefaultETagAction ( string httpVerb ) : ETagAction
GetErrorResponseHandlers ( ) : IEnumerable
GetReturnMimeType ( ReturnType returnType ) : string
HandleFailedRequest ( AsyncExecutionState state, WebException exception, AsyncRequestResult &asyncRequestResult ) : bool

Handles a failed request, and tries to fix it if possible.

Can not throw an exception.

InternalBeginExecuteRequest ( AsyncExecutionState state ) : void

Begins executing a request based upon the current execution state.

Does not check preconditions.

InternalEndExecuteRequest ( IAsyncResult asyncResult ) : void

Ends executing an asynchronous request.

메소드 상세

CreateRequest() 공개 정적인 메소드

Given an API method, create the appropriate Request for it.
public static CreateRequest ( IService service, IMethod method ) : IRequest
service IService
method IMethod
리턴 IRequest

ExecuteRequest() 공개 메소드

Executes a request given the configuration options supplied.
public ExecuteRequest ( ) : IResponse
리턴 IResponse

ExecuteRequestAsync() 공개 메소드

Executes the request asynchronously, and calls the specified delegate once done.
public ExecuteRequestAsync ( Action responseHandler ) : void
responseHandler Action The method to call once a response has been received.
리턴 void

HttpMethodHasBody() 공개 정적인 메소드

Returns true if this http method can have a body.
public static HttpMethodHasBody ( string httpMethod ) : bool
httpMethod string
리턴 bool

On() 공개 메소드

The method to call
public On ( string rpcName ) : IRequest
rpcName string
리턴 IRequest

Request() 공개 메소드

public Request ( ) : System.IO.Compression
리턴 System.IO.Compression

Returning() 공개 메소드

Sets the type of data that is expected to be returned from the request. Defaults to Json.
public Returning ( ReturnType returnType ) : IRequest
returnType ReturnType /// A ///
리턴 IRequest

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

WithAppName() 공개 메소드

Sets the Application name on the UserAgent String.
public WithAppName ( string name ) : IRequest
name string /// A ///
리턴 IRequest

WithAuthentication() 공개 메소드

Uses the provided authenticator to add authentication information to this request.
public WithAuthentication ( IAuthenticator authenticator ) : IRequest
authenticator IAuthenticator
리턴 IRequest

WithBody() 공개 메소드

Uses the string provied as the body of the request.
public WithBody ( string body ) : IRequest
body string
리턴 IRequest

WithETag() 공개 메소드

Adds an ETag to this request.
public WithETag ( string etag ) : IRequest
etag string
리턴 IRequest

WithETagAction() 공개 메소드

Sets the ETag-behavior of this request.
public WithETagAction ( ETagAction action ) : IRequest
action ETagAction
리턴 IRequest

WithFields() 공개 메소드

Specifies the partial field mask of this method. The response of this request will only contain the fields specified in this mask.
public WithFields ( string mask ) : IRequest
mask string Selector specifying which fields to include in a partial response.
리턴 IRequest

WithKey() 공개 메소드

Adds the developer key to this request.
public WithKey ( string key ) : IRequest
key string
리턴 IRequest

WithParameters() 공개 메소드

Adds the parameters to the request.
public WithParameters ( object>.IDictionary parameters ) : IRequest
parameters object>.IDictionary
리턴 IRequest

WithParameters() 공개 메소드

Adds the parameters to the request.
public WithParameters ( string>.IEnumerable parameters ) : IRequest
parameters string>.IEnumerable
리턴 IRequest

WithParameters() 공개 메소드

Parses the specified querystring and adds these parameters to the request
public WithParameters ( string parameters ) : IRequest
parameters string
리턴 IRequest

WithUserIp() 공개 메소드

IP address of the site where the request originates. Use this if you want to enforce per-user limits.
public WithUserIp ( string userIp ) : IRequest
userIp string
리턴 IRequest

프로퍼티 상세

ContentCharset 공개적으로 정적으로 프로퍼티

The charset used for content encoding.
public static Encoding,System.Text ContentCharset
리턴 System.Text.Encoding

SupportedHttpMethods 공개적으로 정적으로 프로퍼티

public static ReadOnlyCollection SupportedHttpMethods
리턴 ReadOnlyCollection