Skip to content

Commit 67fd427

Browse files
Update req_config.md (#202)
Co-authored-by: Jay <[email protected]>
1 parent 233aa88 commit 67fd427

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

posts/en/req_config.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,10 @@ These are the available config options for making requests. Only the `url` is re
174174
}
175175
},
176176

177-
// `cancelToken` specifies a cancel token that can be used to cancel the request
177+
// `signal` and instance of AbortController can be used to cancel the request
178+
signal: new AbortController().signal,
179+
180+
// (Deprecatred) `cancelToken` specifies a cancel token that can also be used to cancel the request
178181
// (see Cancellation section below for details)
179182
cancelToken: new CancelToken(function (cancel) {
180183
}),

0 commit comments

Comments
 (0)