Today, I am very pleased to announce the release of
Another Crystal HTTP library? Why should I care?
- Redirects support.
- HTTP(S) proxy support.
- Elegant Key/Value headers, cookies, params, and payload.
- Multipart file uploads.
Hopefully, someday I can remove this shard though. Ideally, Crystal's standard library would do all this already.
More info you can find on the project page: https://github.com/mamantoha/crest
New capabilities of version
Crest::Request verb methods(
post, etc.) can yields the
Crest::Request to the block.
response = Crest::Request.get("http://example.com") do |request|
Crest::Resource initializer can accept the instance of
This is useful for unusual cases when you want to set additional options (e.g. read timeout, authorization header etc.).
client = HTTP::Client.new("http://example.com")
client.read_timeout = 1.second