Class: ServiceRequest

ServiceRequest(httpRequestBuilder, requestExecutor)

Wrapper class for service request.

Contains the request builder and the executor function that will perform the request and produce the results.

This wrapper allows to modify the request builder before executing it, preserving any chained promises to the executor.

Constructor

new ServiceRequest(httpRequestBuilder, requestExecutor)

Instantiates the request with the supplied builder and executor.

Parameters:
Name Type Description
httpRequestBuilder HttpRequestBuilder

builder carrying the request data and params

requestExecutor function

executor for HTTP requests

Author:
  • Mihail Radkov
Source:

Methods

execute() → {Promise}

Triggers service request execution.

Source:
Returns:
Type
Promise

getHttpRequestBuilder() → {HttpRequestBuilder}

Returns the request builder.

Source:
Returns:
Type
HttpRequestBuilder