mirror of
https://github.com/immich-app/immich.git
synced 2026-01-22 01:18:54 -08:00
uppercase http method
This commit is contained in:
@@ -41,7 +41,7 @@ class RemoteImageRequest extends ImageRequest {
|
||||
return null;
|
||||
}
|
||||
|
||||
final req = http.AbortableRequest('get', Uri.parse(uri), abortTrigger: abortTrigger.future);
|
||||
final req = http.AbortableRequest('GET', Uri.parse(uri), abortTrigger: abortTrigger.future);
|
||||
req.headers.addAll(headers);
|
||||
final res = await _client.send(req);
|
||||
if (_isCancelled) {
|
||||
@@ -49,6 +49,10 @@ class RemoteImageRequest extends ImageRequest {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (res.statusCode != 200) {
|
||||
throw Exception('Failed to download $uri: ${res.statusCode}');
|
||||
}
|
||||
|
||||
final stream = res.stream.map((chunk) {
|
||||
if (_isCancelled) {
|
||||
throw StateError('Cancelled request');
|
||||
|
||||
Reference in New Issue
Block a user