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.
deserializerdeserializes JSON to an object of typeT.serializerserializes an object of typeTto JSON.hostis the host part of the API endpoint request.headersis a nullable hashmap of headers for the API endpoint request.pathis the path element for the API endpoint uri. Defaults to an empty String.protocolis the HttpProtocol of the API endpoint.queryParametersis 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);