diff options
author | Juan Carlos <juancarlospaco@gmail.com> | 2022-02-25 11:34:16 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-25 20:34:16 +0100 |
commit | f0bfc0bd3f619c0933df5b71a0a04d4181d99880 (patch) | |
tree | a79b8a72c39b310a180a6f5b01a29757b0650a7d /lib/std/jsfetch.nim | |
parent | 9c17a32e0ec45de83c21d84f98be7f351ccd1172 (diff) | |
download | Nim-f0bfc0bd3f619c0933df5b71a0a04d4181d99880.tar.gz |
Remove define for jsfetch (#19530)
* Remove define nimExperimentalAsyncjsThen for std/asyncjs.then and std/jsfetch * Remove define nimExperimentalAsyncjsThen for std/asyncjs.then and std/jsfetch * Remove define nimExperimentalAsyncjsThen for std/asyncjs.then and std/jsfetch * Remove define nimExperimentalAsyncjsThen for std/asyncjs.then and std/jsfetch
Diffstat (limited to 'lib/std/jsfetch.nim')
-rw-r--r-- | lib/std/jsfetch.nim | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/std/jsfetch.nim b/lib/std/jsfetch.nim index 808d699b0..034bb6332 100644 --- a/lib/std/jsfetch.nim +++ b/lib/std/jsfetch.nim @@ -190,12 +190,11 @@ runnableExamples("-r:off"): discard example() - when defined(nimExperimentalAsyncjsThen): - block: - proc example2 {.async.} = - await fetch("https://api.github.com/users/torvalds".cstring) - .then((response: Response) => response.json()) - .then((json: JsObject) => console.log(json)) - .catch((err: Error) => console.log("Request Failed", err)) - - discard example2() + block: + proc example2 {.async.} = + await fetch("https://api.github.com/users/torvalds".cstring) + .then((response: Response) => response.json()) + .then((json: JsObject) => console.log(json)) + .catch((err: Error) => console.log("Request Failed", err)) + + discard example2() |