Comments (5)
curl-crystal is not concurrent, it blocks crystal main thread, so it hard to run multiple requests at the same time (or even use it with http server or something). Surely builtin lib is much better, because allowed big concurrency (but it quite limited, no proxy, no socks, no redirects, no sessions, no some more features that curl have). For concurrency with curl-crystal i use: https://github.com/kostya/curl-downloader#example-with-thread_pool-to-execute-request-in-the-background-and-not-to-lock-crystal-main-thread, but it quite hack, and have problems with segfaults.
from curl-crystal.
to summarize, curl-crystal
is performant and recommanded if, and only if you do not need concurrency.
to be factual, I want to create a CLI to (so no need of concurrency), so curl-crystal
is well chosen, in this use case, right ?
from curl-crystal.
if you have only one request per time and no background things, so this lib if fine. i create simple wrapper for this lib: https://github.com/kostya/curl-downloader
from curl-crystal.
@kostya ok. seems nice ;-) I will try
from curl-crystal.
Hi @waghanza
Your question is right; basically I agree with @kostya
In most cases it's better to use the standard library built-in net functions.
This shard could be useful in some situations where some specific net options are needed or as alternative for testing purposes.
from curl-crystal.
Related Issues (2)
- multi support HOT 4
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 curl-crystal.