mirror of
https://github.com/foss42/apidash.git
synced 2025-12-02 02:39:19 +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);
|
final isStreaming = kStreamingResponseTypes.contains(contentType);
|
||||||
controller.add((isStreaming, response, stopwatch.elapsed, null));
|
controller.add((isStreaming, response, stopwatch.elapsed, null));
|
||||||
chunkList.clear();
|
chunkList.clear();
|
||||||
|
} else {
|
||||||
|
final response = _createResponseFromBytes([]);
|
||||||
|
controller.add((false, response, stopwatch.elapsed, null));
|
||||||
}
|
}
|
||||||
await _cleanup();
|
await _cleanup();
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user