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
This commit is contained in:
parent
9c17a32e0e
commit
f0bfc0bd3f
4 changed files with 83 additions and 84 deletions
|
|
@ -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))
|
||||
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()
|
||||
discard example2()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue