IOStreamedResponse constructor

IOStreamedResponse(
  1. Stream<List<int>> stream,
  2. int statusCode, {
  3. int? contentLength,
  4. BaseRequest? request,
  5. Map<String, String> headers = const {},
  6. bool isRedirect = false,
  7. bool persistentConnection = true,
  8. String? reasonPhrase,
  9. HttpClientResponse? inner,
})

Creates a new streaming response.

stream should be a single-subscription stream.

If inner is not provided, detachSocket will throw.

Implementation

IOStreamedResponse(Stream<List<int>> stream, int statusCode,
    {int? contentLength,
    BaseRequest? request,
    Map<String, String> headers = const {},
    bool isRedirect = false,
    bool persistentConnection = true,
    String? reasonPhrase,
    HttpClientResponse? inner})
    : _inner = inner,
      super(stream, statusCode,
          contentLength: contentLength,
          request: request,
          headers: headers,
          isRedirect: isRedirect,
          persistentConnection: persistentConnection,
          reasonPhrase: reasonPhrase);