Releases: sagebind/isahc
Releases · sagebind/isahc
0.5 Alpha 2
0.5 Alpha 1
This is the first alpha release for version 0.5! There are a lot of things in this release, but the primary changes include improvments to the API and integration with std::future::Future
, which was just recently released as stable.
Added
- In addition to the existing synchronous
send
,get
,post
(etc) methods, asynchronous versions of these methods are now available, suffixed with_async
. These methods do the exact same things as the synchronous versions, except entirely asynchronously. (#27) - When creating a request body from a reader, you can now provide a length hint if you know the size of the body ahead of time. When providing a length hint, the hint will be used as the value of the
Content-Length
request header and be sent directly, instead of using a streaming encoding.
Improvements
- The background agent thread that manages active requests has received many changes and improvements and is now fully asynchronous This offers less latency when multiple parallel requests are active and increased overall performance.
- Response buffers now use sluice which greatly increases the efficiency of reading from the HTTP response stream.
Changed
- The
Options
struct has been removed. Instead, request execution options can be set by using extension methods provided forhttp::request::Builder
, or by setting default configuration using methods available onClientBuilder
. This greatly improves the ergonomics of setting various options, as well as allows you to override specific options picemeal instead of overriding everything. (#35) Body
is now asynchronous internally. It still implementsRead
for ease of use, but you can no longer create a body from a synchronous reader. This fixes latency issues inside the agent thread, where previously sending and receiving bodies might block the entire event loop and prevent other parallel requests from making progress for a short time.
This also means that you can optionally read from a responseBody
within an asynchronous application without blocking. (#27)- Dropping a
Client
will now block until the associated agent thread shuts down. If the agent thread errors, it will propagate back to the main thread.
Address security vulnerability in libcurl
Security Fixes
- Upgrade the bundled version of libcurl from 7.64.1 to 7.65.1 to address security vulnerability CVE-2019-5436 filed against that version. (#34, #37)
Fix Canceled errors
Link libcurl statically by default
Changed
- libcurl will now be linked statically by default instead of using the system libcurl when available. Sometimes when using the platform provided libcurl there can be subtle differences between systems that can be hard to track down. This will result in more consistent behavior between platforms that is easier to maintain. If you need to use the platform libcurl specifically, you can disable the new
static-curl
crate feature (enabled by default).
2019-04-05
- Fix compile issues in the agent notify channel on Windows.
2019-02-27
- Add additional options for SSL/TLS. You can now override the list of acceptable ciphers to use in an SSL/TLS connection, and also provide a custom client certificate to use.
2019-01-19
- Reduced API surface area of
Body
, removedSeek
implementation. In the future, request and response body may beAsyncRead
instead, or even a trait. Body
can be "resettable" instead of seekable, which will now be used if curl requests to seek to the beginning of the request body stream.- Small optimization in handling curl multi messages to reduce allocations.
2019-01-17
- Add some new debug logging and assertions that point out unexpected behavior.
- Add more examples of how cHTTP can be used.
- Update source code to use Rust 2018 edition conventions.
2018-12-05
- Add a new in-memory cookie jar system for preserving cookies between requests. Use
.with_cookies()
on the client builder to enable cookie management for a client. This feature is put behind thecookies
feature flag, which is enabled by default. - Add a new unstable middleware API, which allows you to apply transformations to every client request. You must enable the
middleware-api
feature flag to access it. - Add a new unstable futures-based API for sending requests asynchronously. You must enable the
async-api
feature flag to access it. This feature will likely not be stabilized until futures are stabilized in the standard library. - Requests will now include a default user agent if an explicit
User-Agent
header is not set. - HTTP/2 support can now be disabled by removing the
http2
feature flag (enabled by default).