Comments (4)
now working fine!
from cyber.
fetchUrl is currently synchronous. If you're getting no response, then it's probably a bug with the builtin http client; you should post what url you're using if that's the case. You can also use os.execCmd if you have an installed http client like curl.
There will be an equivalent of await in the language, although the design hasn't been finalized. I don't think there would be a builtin async io library though. Instead, Cyber would provide the ability to create one by exposing an api for Promises.
from cyber.
pls , try this sample
while true:
resp = fetchUrl('http://httpstat.us/200?sleep=10000')
print resp
no delay of 10s between calls
what is wrong with this expectations ?
by the way , thanks for fixing sleep on Windows!
from cyber.
No problem!
This looks like the query parameter isn't sent. So it's actually doing this: GET /200 HTTP/1.1
instead of this GET /200?sleep=10000 HTTP/1.1
That's why you're getting a response so quickly. I'll make the fix now, one moment...
Edit: This should be working now
from cyber.
Related Issues (20)
- Jupyter Kernel HOT 3
- Is it possible to Implement a Cyber repl HOT 3
- Null Safety / Null Coalescing plans? HOT 1
- RFC: Replace CYON with JSON5 HOT 1
- README links are broken HOT 1
- Independent Benchmarks HOT 1
- Embeddable static library undefined symbols HOT 6
- Error occurs when compiling the examples - undefined symbol: execBytecode. HOT 4
- Implement Fiber.reset HOT 1
- Unstable zig package for tooling HOT 12
- Revising data literal syntax. HOT 1
- Hot Reloading? HOT 1
- Printer functions seem to duplicate output prefix HOT 3
- CLI / wasm HOT 2
- Add multi -thread support HOT 1
- findAnyRune return unexpected index HOT 2
- Document description is inconsistent with interface specification HOT 1
- android build support HOT 6
- "TODO" error when defining out-of-body $call for type trait HOT 2
- Feature request: expose a zig module HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cyber.