mercury_client library

Classes

Authorization
Represents a kind of HTTP Authorization.
BasicCredential
A HTTP Basic Credential for the Authorization header.
BearerCredential
A HTTP Bearer Credential for the Authorization header.
Credential
Abstract Credential for HttpRequest.
HttpBody
Represents a body content, used by HttpRequest.
HttpCache
A cache for HttpClient. Request originated from this cache are stored in memory.
HttpCall<R>
Represents a simple HTTP call that can be called many times.
HttpClient
Mercury HTTP Client.
HttpClientRequester
Abstract HttpClient requester. This should implement the actual request process.
HttpClientRequesterSimulation
A Simulated HttpClientRequester. Usefull for tests and mocks.
HttpError
Represents a response Error.
HttpRequest
Represents the HTTP request.
HttpRequester
A Class able to do a HTTP request based in properties: [...]
HttpResponse
The response of a HttpRequest.
HttpStatus
Represents a HTTP Status with helpers. Base for HttpResponse and HttpError.
JSONBodyCredential
A Credential that injects a JSON in the HttpRequest body.
QueryStringCredential
A Credential that injects fields in the Query paramaters.

Functions

buildURLWithQueryParameters(String url, Map<String, String> fields) String
Builds an URL with Query parameters adding the map fields to current Query parameters.
canHttpMethodHaveBody(HttpMethod method) bool
contentTypeToDecoder(String mimeType, [String charset]) Converter<List<int>, String>
Returns de decoder for a Content-Type at parameter mimeType and charset.
createHttpClientRequester() HttpClientRequester
Creates a HttpClientRequester based in imported platform.
getHttpClientRuntimeUri() Uri
Returns the base runtime Uri for the platform.
getHttpMethod(String method, [HttpMethod def]) HttpMethod
Returns HttpMethod instance for method parameter.
getHttpMethodName(HttpMethod method, [HttpMethod def]) String
Returns method name.

Enums

HttpMethod
HTTP Method

Typedefs

AuthorizationInterceptor(Authorization authorization) → void
AuthorizationProvider(HttpClient client, HttpError lastError) Future<Credential>
HttpBodyBuilder(Map<String, String> parameters) → dynamic
Function to dynamically build a HTTP body.
HttpBodyBuilderTyped(Map<String, String> parameters, String type) → dynamic
HttpClientURLFilter(String url, Map<String, String> queryParameters) String
RequestHeadersBuilder(HttpClient client, String url) Map<String, String>
ResponseHeaderGetter(String headerKey) String
ResponseProcessor(HttpClient client, dynamic request, HttpResponse response) → void
SimulateResponse(String url, Map<String, String> queryParameters) String