Skip to content

Commit 4ac4b2e

Browse files
committed
docs(Http): Fix incorrect documentation about cache usage.
Closes dart-archive#1066
1 parent daef71b commit 4ac4b2e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/core_dom/http.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,8 @@ class Http {
415415
* - xsrfHeaderName: TBI
416416
* - xsrfCookieName: TBI
417417
* - interceptors: Either a [HttpInterceptor] or a [HttpInterceptors]
418-
* - cache: Boolean or [Cache]. If true, the default cache will be used.
418+
* - cache: Boolean or [Cache]. If true, the default cache will be used. If false, no cache will
419+
* be used. If object of type [Cache] is provided, that object will be used as cache.
419420
* - timeout: deprecated
420421
*/
421422
async.Future<HttpResponse> call({
@@ -468,7 +469,7 @@ class Http {
468469

469470
if (cache == false) {
470471
cache = null;
471-
} else if (cache == null) {
472+
} else if (cache == true) {
472473
cache = defaults.cache;
473474
}
474475

0 commit comments

Comments
 (0)