uploadLicenseFileWithHttpInfo method
Upload license file
Upload a license to enable enterprise features. Minimum server version: 4.0 ##### Permissions Must have manage_system
permission.
Note: This method returns the HTTP Response
.
Parameters:
MultipartFile
license (required): The license to be uploaded
Implementation
Future<Response> uploadLicenseFileWithHttpInfo(
MultipartFile license,
) async {
// ignore: prefer_const_declarations
final path = r'/license';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <MmQueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['multipart/form-data'];
bool hasFields = false;
final mp = MultipartRequest('POST', Uri.parse(path));
if (license != null) {
hasFields = true;
mp.fields[r'license'] = license.field;
mp.files.add(license);
}
if (hasFields) {
postBody = mp;
}
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}