appendBlock method
Append block to blob.
Implementation
Future<void> appendBlock(
String path, {
String? body,
Uint8List? bodyBytes,
}) async {
var request = http.Request('PUT', uri(path: path, queryParameters: {'comp': 'appendblock'}));
if (bodyBytes != null) {
request.bodyBytes = bodyBytes;
} else if (body != null) {
request.body = body;
}
_sign(request);
var res = await request.send();
if (res.statusCode == 201) {
await res.stream.drain();
return;
}
var message = await res.stream.bytesToString();
throw AzureStorageException(message, res.statusCode, res.headers);
}