Class HttpService.FastHttpService
- Namespace
- Akavache
- Assembly
- Akavache.dll
Provides a fast-failing HTTP service that reduces retries and timeouts to speed up tests.
- Inheritance
-
Http
Service. Fast Http Service
- Implements
- Inherited Members
- Extension Methods
Constructors
FastHttpService(int, TimeSpan?)
Initializes a new instance of the Http
Parameters
retriesintThe number of retry attempts to use (default is 0).
timeoutTimeSpan ?The timeout duration to use (default is 2 seconds).
Methods
MakeWebRequest(Uri, HttpMethod, IEnumerable<KeyValuePair<string, string>>?, string?, int, TimeSpan?)
Makes a web request to the specified URI.
protected override IObservable<HttpResponseMessage> MakeWebRequest(Uri uri, HttpMethod method, IEnumerable<KeyValuePair<string, string>>? headers = null, string? content = null, int retries = 3, TimeSpan? timeout = null)
Parameters
uriUriThe URI to make the request to.
methodHttpMethod The HTTP method to use for the request.
headersIEnumerable<KeyValue <string, string>>Pair Optional HTTP headers to include in the request.
contentstringOptional content to send with the request.
retriesintThe number of retry attempts for failed requests.
timeoutTimeSpan ?The timeout duration for the request.
Returns
- IObservable<Http
Response >Message An observable that emits the HTTP response message.