function method
Apply profile to config.
/api/v0/config/profile/apply
Arguments:
profile
String
: The profile to apply to the config.
Optional arguments:
dryRun
bool
: Print difference between the current config and the config that would be generated.
Response:
{
"NewCfg": {
"<string>": "<object>"
},
"OldCfg": {
"<string>": "<object>"
},
"StatusCode": "<statusCode>",
"StatusMessage": "<statusMessage>"
}
See more: https://docs.ipfs.io/reference/http/api/#api-v0-config-profile-apply
Implementation
Future<Map<String, dynamic>> function(
{required String profile, bool? dryRun}) async {
Response? res = await _post(
Ipfs.dio,
url: "${Ipfs.url}/config/profile/apply",
queryParameters: {
"arg": profile,
if (dryRun != null) "dry-run": dryRun,
},
);
return _interceptDioResponse(res, expectsResponseBody: true);
}