MockHttpResponse constructor

MockHttpResponse(
  1. {bool copyBuffer = true,
  2. int statusCode = 200,
  3. String reasonPhrase = '',
  4. int contentLength = 0,
  5. Duration? deadline,
  6. Encoding encoding = utf8,
  7. bool persistentConnection = false,
  8. bool? bufferOutput}
)

copyBuffer corresponds to copy on the BytesBuilder constructor.

Implementation

MockHttpResponse(
    {bool copyBuffer = true,
    this.statusCode = 200,
    this.reasonPhrase = '',
    this.contentLength = 0,
    this.deadline,
    this.encoding = utf8,
    this.persistentConnection = false,
    bool? bufferOutput}) {
  _buf = BytesBuilder(copy: copyBuffer != false);
  _bufferOutput = bufferOutput != false;
}