putAuthorized function
Future<Response>
putAuthorized(
- String endpoint, {
- String? body,
- Client? client,
- required Credential credential,
- bool isSandbox = false,
Makes an authorized PUT request to the Coinbase Advanced Trade API.
This function generates a JWT, and then makes a PUT request to the specified endpoint with the JWT in the Authorization header.
endpoint - The API endpoint to make the request to.
body - The body of 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> putAuthorized(String endpoint,
{String? body,
http.Client? client,
required Credential credential,
bool isSandbox = false}) async {
return await _makeAuthorizedRequest(
method: _HttpMethod.put,
endpoint: endpoint,
body: body,
client: client,
credential: credential,
isSandbox: isSandbox);
}