HttpTransport constructor

HttpTransport({
  1. Client? client,
  2. int maxRequestBodyBytes = defaultMaxRequestBodyBytes,
})

Creates a transport, optionally reusing an existing HTTP client.

Implementation

HttpTransport({
  http.Client? client,
  int maxRequestBodyBytes = defaultMaxRequestBodyBytes,
}) : maxRequestBodyBytes = _positiveMaxRequestBodyBytes(maxRequestBodyBytes),
     _client = client ?? http.Client(),
     _ownsClient = client == null;