ApiEndpoint<T extends Object> constructor
ApiEndpoint<T extends Object> ({
- required JsonDeserializer<
T> deserializer, - required String host,
- required JsonSerializer<
T> serializer, - HttpHeaders? headers,
- String path = '',
- HttpProtocol protocol = HttpProtocol.https,
- QueryParameters? queryParameters,
A factory constructor that returns a ApiEndpoint from the parameters.
deserializer
deserializes JSON to an object of typeT
.serializer
serializes an object of typeT
to JSON.host
is the host part of the API endpoint request.headers
is a nullable hashmap of headers for the API endpoint request.path
is the path element for the API endpoint uri. Defaults to an empty String.protocol
is the HttpProtocol of the API endpoint.queryParameters
is a nullable hashmap of query parameters for the API endpoint request.
Implementation
factory ApiEndpoint(
{required JsonDeserializer<T> deserializer,
required String host,
required JsonSerializer<T> serializer,
HttpHeaders? headers,
String path = '',
HttpProtocol protocol = HttpProtocol.https,
QueryParameters? queryParameters}) =>
_ApiEndpointImpl(deserializer, headers, host, path, protocol,
queryParameters, serializer);