Class WebApiBuilder
- Namespace
- CSF.Screenplay.WebApis
- Assembly
- CSF.Screenplay.WebApis.dll
A builder for the performables SendTheHttpRequest and SendTheHttpRequestAndGetTheResponse<TResponse>.
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
endpointEndpoint<TResponse>The endpoint from which to get an action.
clientNamestringAn 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
TResponseThe 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
endpointParameterizedEndpoint<TParameters, TResponse>The endpoint from which to get an action.
parametersTParametersThe parameters required by the endpoint.
clientNamestringAn 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
TParametersThe type of the parameters expected by the endpoint
TResponseThe 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
endpointEndpointThe endpoint from which to get an action.
clientNamestringAn 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
endpointEndpoint<TResponse>The endpoint from which to get an action.
clientNamestringAn 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
TResponseThe 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
endpointParameterizedEndpoint<TParameters>The endpoint from which to get an action.
parametersTParametersThe parameters required by the endpoint.
clientNamestringAn 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
TParametersThe 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
endpointParameterizedEndpoint<TParameters, TResponse>The endpoint from which to get an action.
parametersTParametersThe parameters required by the endpoint.
clientNamestringAn 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
TParametersThe type of the parameters expected by the endpoint
TResponseThe type of the expected result value