C# Class Amido.Testing.Http.RestClient

Inheritance: IRestClient, IVerb, IRetryAttempts
Afficher le fichier Open project: amido/Amido.Testing

Méthodes publiques

Méthode Description
AddAcceptHeader ( AcceptHeader acceptHeader ) : IRestClient

Helper method for adding an Accept header to the request.

AddAuthorizationHeader ( string scheme, string parameter ) : IRestClient
AddBody ( string bodyString ) : IRestClient

The request body as a string.

AddContentType ( ContentType contentType ) : IRestClient

Helper method for adding a content type to the request.

AddFormParameter ( string key, string value ) : IRestClient

AddHeader ( string key, string value ) : IRestClient

Add a header to the request.

AddQueryStringParameter ( string key, string value ) : IRestClient

Adds a query string parameter to the request url.

MakeRequest ( ) : HttpResponseMessage
RequestUri ( string url ) : IRetryAttempts
WithRetries ( RetryType retryType, object retryParameter, int maxRetries, int interval ) : IVerb
WithVerb ( HttpMethod httpMethod ) : IRestClient
WithoutRetries ( ) : IVerb

Méthodes protégées

Méthode Description
RestClient ( string url ) : System

Private Methods

Méthode Description
IsFinalRetryRequest ( int currentRetryIndex ) : bool
IsRetryConditionSatisfied ( HttpResponseMessage httpResponseMessage, RetryType retryType, object retryParameter ) : bool
SetCertificationValidation ( bool validationResult ) : IRestClient
WriteRequestToDebugWindow ( int currentRetryIndex, int maxRetries, HttpRequestMessage httpRequestMessage ) : void
WriteResponseToDebugWindow ( int currentRetryIndex, int maxRetries, HttpResponseMessage httpResponseMessage ) : void

Method Details

AddAcceptHeader() public méthode

Helper method for adding an Accept header to the request.
public AddAcceptHeader ( AcceptHeader acceptHeader ) : IRestClient
acceptHeader AcceptHeader The .
Résultat IRestClient

AddAuthorizationHeader() public méthode

public AddAuthorizationHeader ( string scheme, string parameter ) : IRestClient
scheme string
parameter string
Résultat IRestClient

AddBody() public méthode

The request body as a string.
public AddBody ( string bodyString ) : IRestClient
bodyString string The string to be used for the request body.
Résultat IRestClient

AddContentType() public méthode

Helper method for adding a content type to the request.
public AddContentType ( ContentType contentType ) : IRestClient
contentType ContentType The .
Résultat IRestClient

AddFormParameter() public méthode

public AddFormParameter ( string key, string value ) : IRestClient
key string
value string
Résultat IRestClient

AddHeader() public méthode

Add a header to the request.
public AddHeader ( string key, string value ) : IRestClient
key string The key of the header.
value string The value of the header.
Résultat IRestClient

AddQueryStringParameter() public méthode

Adds a query string parameter to the request url.
public AddQueryStringParameter ( string key, string value ) : IRestClient
key string The key of the querystring parameter.
value string The value of the querystring parameter.
Résultat IRestClient

MakeRequest() public méthode

public MakeRequest ( ) : HttpResponseMessage
Résultat HttpResponseMessage

RequestUri() public static méthode

public static RequestUri ( string url ) : IRetryAttempts
url string
Résultat IRetryAttempts

RestClient() protected méthode

protected RestClient ( string url ) : System
url string
Résultat System

WithRetries() public méthode

public WithRetries ( RetryType retryType, object retryParameter, int maxRetries, int interval ) : IVerb
retryType RetryType
retryParameter object
maxRetries int
interval int
Résultat IVerb

WithVerb() public méthode

public WithVerb ( HttpMethod httpMethod ) : IRestClient
httpMethod HttpMethod
Résultat IRestClient

WithoutRetries() public méthode

public WithoutRetries ( ) : IVerb
Résultat IVerb