mirror of
https://github.com/foss42/apidash.git
synced 2025-12-01 18:28:25 +08:00
streamHttpRequest: made provision for empty responses
This commit is contained in:
@@ -169,6 +169,9 @@ Future<Stream<HttpStreamOutput>> streamHttpRequest(
|
||||
final isStreaming = kStreamingResponseTypes.contains(contentType);
|
||||
controller.add((isStreaming, response, stopwatch.elapsed, null));
|
||||
chunkList.clear();
|
||||
} else {
|
||||
final response = _createResponseFromBytes([]);
|
||||
controller.add((false, response, stopwatch.elapsed, null));
|
||||
}
|
||||
await _cleanup();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user