C# 클래스 Amido.Testing.WebApi.WebApiRequest

Helper class for creating a WebTestRequest.
파일 보기 프로젝트 열기: amido/Amido.Testing

공개 메소드들

메소드 설명
AddAcceptHeader ( AcceptHeader acceptHeader ) : WebApiRequest

Helper method for adding an Accept header to the request.

AddBody ( string bodyString ) : WebApiRequest

The request body as a string.

AddContentType ( ContentType contentType ) : WebApiRequest

Helper method for adding a content type to the request.

AddFormParameter ( string key, string value ) : WebApiRequest

AddHeader ( string key, string value ) : WebApiRequest

Add a header to the request.

AddQueryStringParameter ( string key, string value ) : WebApiRequest

Adds a query string parameter to the request url.

Create ( ) : WebTestRequest

Creates a WebTestRequest using the properties and values of the configured WebApiRequest.

SetCertificationValidation ( bool validationResult ) : WebApiRequest

Helper method for overriding the certificate validation callback result.

Url ( string url ) : WebApiRequest

Static method for constructing a new WebApiRequest.

WithVerb ( Verb httpVerb ) : WebApiRequest

Sets the http verb to be used in the request.

보호된 메소드들

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

비공개 메소드들

메소드 설명
AddRequestBody ( WebTestRequest request ) : void
CreateRequest ( String requestUrl ) : WebTestRequest
SetRequestHeaders ( WebTestRequest request ) : void

메소드 상세

AddAcceptHeader() 공개 메소드

Helper method for adding an Accept header to the request.
public AddAcceptHeader ( AcceptHeader acceptHeader ) : WebApiRequest
acceptHeader AcceptHeader The .
리턴 WebApiRequest

AddBody() 공개 메소드

The request body as a string.
public AddBody ( string bodyString ) : WebApiRequest
bodyString string The string to be used for the request body.
리턴 WebApiRequest

AddContentType() 공개 메소드

Helper method for adding a content type to the request.
public AddContentType ( ContentType contentType ) : WebApiRequest
contentType ContentType The .
리턴 WebApiRequest

AddFormParameter() 공개 메소드

public AddFormParameter ( string key, string value ) : WebApiRequest
key string
value string
리턴 WebApiRequest

AddHeader() 공개 메소드

Add a header to the request.
public AddHeader ( string key, string value ) : WebApiRequest
key string The key of the header.
value string The value of the header.
리턴 WebApiRequest

AddQueryStringParameter() 공개 메소드

Adds a query string parameter to the request url.
public AddQueryStringParameter ( string key, string value ) : WebApiRequest
key string The key of the querystring parameter.
value string The value of the querystring parameter.
리턴 WebApiRequest

Create() 공개 메소드

Creates a WebTestRequest using the properties and values of the configured WebApiRequest.
public Create ( ) : WebTestRequest
리턴 WebTestRequest

SetCertificationValidation() 공개 메소드

Helper method for overriding the certificate validation callback result.
public SetCertificationValidation ( bool validationResult ) : WebApiRequest
validationResult bool the value to return on the certificate validation callback.
리턴 WebApiRequest

Url() 공개 정적인 메소드

Static method for constructing a new WebApiRequest.
public static Url ( string url ) : WebApiRequest
url string The url. Zero indexed placeholders can be used to tokenise url, exactly like using string.Format.
리턴 WebApiRequest

WebApiRequest() 보호된 메소드

protected WebApiRequest ( string url ) : System
url string
리턴 System

WithVerb() 공개 메소드

Sets the http verb to be used in the request.
public WithVerb ( Verb httpVerb ) : WebApiRequest
httpVerb Verb The .
리턴 WebApiRequest