Merge branch 'foss42:main' into add-feature-oauth-2

This commit is contained in:
Udhay Adithya
2025-08-07 00:32:08 +05:30
committed by GitHub
65 changed files with 2763 additions and 942 deletions

View File

@@ -114,7 +114,6 @@ Future<HttpRequestModel> handleAuth(
final httpResult = await sendHttpRequest(
"digest-${Random.secure()}",
APIType.rest,
null,
httpRequestModel,
);
final httpResponse = httpResult.$1;

View File

@@ -50,20 +50,3 @@ Future<http.Response> convertStreamedResponse(
return response;
}
Stream<String?> streamTextResponse(
http.StreamedResponse streamedResponse,
) async* {
try {
if (streamedResponse.statusCode != 200) {
final errorText = await streamedResponse.stream.bytesToString();
throw Exception('${streamedResponse.statusCode}\n$errorText');
}
final utf8Stream = streamedResponse.stream.transform(utf8.decoder);
await for (final chunk in utf8Stream) {
yield chunk;
}
} catch (e) {
rethrow;
}
}