uploadPart method
Implementation
Future<ETagResponse> uploadPart(String uploadId, {Object? body, int? length, String? pathname, String? partnumber}) async {
final builder = RequestBuilder();
builder.body = body;
// create path and map variables
// create path and map variables
builder.path = "/uploads/{uploadId}/parts";
builder.pathParams["uploadId"] = Uri.encodeComponent(uploadId);
builder.headerParams["pathname"] = pathname;
builder.headerParams["partnumber"] = partnumber;
builder.contentType = "application/octet-stream";
if (length != null) {
builder.headerParams["Content-Size"] = length.toString();
}
builder.basePath = apiClient.basePaths["sunnyMain"];
builder.authNames = ["Bearer"];
builder.method = HttpMethod.POST;
final response = await apiClient.invokeRequest(builder);
final value = apiClient.decodeAs<ETagResponse>(response.body);
return value!;
}