getAuthorized function
Future<Response>
getAuthorized(
- String endpoint, {
- Map<
String, dynamic> ? queryParameters, - Client? client,
- required Credential credential,
- bool isSandbox = false,
Makes an authorized GET request to the Coinbase Advanced Trade API.
This function generates a JWT, and then makes a GET request to the specified endpoint with the JWT in the Authorization header.
endpoint - The API endpoint to make the request to.
queryParameters - Optional query parameters to include in the request.
client - Optional http.Client to use for the request.
credential - The user's API credentials.
isSandbox - Whether to use the sandbox environment.
Returns an http.Response object.
Implementation
Future<http.Response> getAuthorized(String endpoint,
{Map<String, dynamic>? queryParameters,
http.Client? client,
required Credential credential,
bool isSandbox = false}) async {
return await _makeAuthorizedRequest(
method: _HttpMethod.get,
endpoint: endpoint,
queryParameters: queryParameters,
client: client,
credential: credential,
isSandbox: isSandbox);
}