HttpRequest.withConnectTimeout

HttpRequest withConnectTimeout(Duration d) const

Returns a copy of this request with a connect timeout.

Parameters

dConnect timeout; negative values are rejected.

Returns

The modified copy; the original request is unchanged.

Throws

HttpException when d is negative.