Table of Contents

Class WebApiBuilder

Namespace
CSF.Screenplay.WebApis
Assembly
CSF.Screenplay.WebApis.dll
public static class WebApiBuilder
Inheritance
WebApiBuilder
Inherited Members

Methods

GetTheJsonResult<TResponse>(Endpoint<TResponse>, string)

Gets an instance of SendTheHttpRequestAndGetJsonResponse<TResponse> from an endpoint and optional client name.

public static SendTheHttpRequestAndGetJsonResponse<TResponse> GetTheJsonResult<TResponse>(Endpoint<TResponse> endpoint, string clientName = null)

Parameters

endpoint Endpoint<TResponse>

The endpoint from which to get an action.

clientName string

An optional client name, for actors who must maintain multiple HTTP clients.

Returns

SendTheHttpRequestAndGetJsonResponse<TResponse>

A performable that will send the HTTP request and await its result and deserialize that result as .

Type Parameters

TResponse

The type of the expected result value

GetTheJsonResult<TParameters, TResponse>(ParameterizedEndpoint<TParameters, TResponse>, TParameters, string)

Gets an instance of SendTheHttpRequestAndGetJsonResponse<TResponse> from a parameterized endpoint, its parameters and an optional client name.

public static SendTheHttpRequestAndGetJsonResponse<TResponse> GetTheJsonResult<TParameters, TResponse>(ParameterizedEndpoint<TParameters, TResponse> endpoint, TParameters parameters, string clientName = null)

Parameters

endpoint ParameterizedEndpoint<TParameters, TResponse>

The endpoint from which to get an action.

parameters TParameters

The parameters required by the endpoint.

clientName string

An optional client name, for actors who must maintain multiple HTTP clients.

Returns

SendTheHttpRequestAndGetJsonResponse<TResponse>

A performable that will send the HTTP request and await its result.

Type Parameters

TParameters

The type of the parameters expected by the endpoint

TResponse

The type of the expected result value

SendTheHttpRequest(Endpoint, string)

Gets an instance of SendTheHttpRequest from an endpoint and optional client name.

public static SendTheHttpRequest SendTheHttpRequest(Endpoint endpoint, string clientName = null)

Parameters

endpoint Endpoint

The endpoint from which to get an action.

clientName string

An optional client name, for actors who must maintain multiple HTTP clients.

Returns

SendTheHttpRequest

A performable that will send the HTTP request and await its result.

SendTheHttpRequest<TResponse>(Endpoint<TResponse>, string)

Gets an instance of SendTheHttpRequestAndGetTheResponse<TResponse> from an endpoint and optional client name.

public static SendTheHttpRequestAndGetTheResponse<TResponse> SendTheHttpRequest<TResponse>(Endpoint<TResponse> endpoint, string clientName = null)

Parameters

endpoint Endpoint<TResponse>

The endpoint from which to get an action.

clientName string

An optional client name, for actors who must maintain multiple HTTP clients.

Returns

SendTheHttpRequestAndGetTheResponse<TResponse>

A performable that will send the HTTP request and await its result.

Type Parameters

TResponse

The type of the expected result value

SendTheHttpRequest<TParameters>(ParameterizedEndpoint<TParameters>, TParameters, string)

Gets an instance of SendTheHttpRequest from a parameterized endpoint, its parameters and an optional client name.

public static SendTheHttpRequest SendTheHttpRequest<TParameters>(ParameterizedEndpoint<TParameters> endpoint, TParameters parameters, string clientName = null)

Parameters

endpoint ParameterizedEndpoint<TParameters>

The endpoint from which to get an action.

parameters TParameters

The parameters required by the endpoint.

clientName string

An optional client name, for actors who must maintain multiple HTTP clients.

Returns

SendTheHttpRequest

A performable that will send the HTTP request and await its result.

Type Parameters

TParameters

The type of the parameters expected by the endpoint

SendTheHttpRequest<TParameters, TResponse>(ParameterizedEndpoint<TParameters, TResponse>, TParameters, string)

Gets an instance of SendTheHttpRequestAndGetTheResponse<TResponse> from a parameterized endpoint, its parameters and an optional client name.

public static SendTheHttpRequestAndGetTheResponse<TResponse> SendTheHttpRequest<TParameters, TResponse>(ParameterizedEndpoint<TParameters, TResponse> endpoint, TParameters parameters, string clientName = null)

Parameters

endpoint ParameterizedEndpoint<TParameters, TResponse>

The endpoint from which to get an action.

parameters TParameters

The parameters required by the endpoint.

clientName string

An optional client name, for actors who must maintain multiple HTTP clients.

Returns

SendTheHttpRequestAndGetTheResponse<TResponse>

A performable that will send the HTTP request and await its result.

Type Parameters

TParameters

The type of the parameters expected by the endpoint

TResponse

The type of the expected result value