| Crates.io | nyquest-preset |
| lib.rs | nyquest-preset |
| version | 0.3.0 |
| created_at | 2025-05-03 08:50:35.323848+00 |
| updated_at | 2025-08-03 14:02:54.624214+00 |
| description | Nyquest preset configuration with up-to-date rich-featured backends |
| homepage | |
| repository | https://github.com/bdbai/nyquest |
| max_upload_size | |
| id | 1658646 |
| size | 23,913 |
Nyquest preset configuration with up-to-date rich-featured backends.
nyquest-preset is the official, default backend provider of nyquest that integrates
nyquest-backend-winrt, nyquest-backend-nsurlsession and nyquest-backend-curl
into a uniform interface. The only exposed APIs are the register function and the
Backend type of the underlying backend.
This crate is intended to be consumed by end application users. Since there can be only one
backend registered as the global default, library authors in general are not recommended to
declare this crate as a dependency. Libraries should use nyquest instead.
Add the following at your program startup:
nyquest_backend::register();
Based on the target platform, a nyquest backend will be registered as the default. Refer to
the documentation of nyquest for usages.
nyquest-preset uses cfg to select the appropriate backend for the target platform.
windows: nyquest-backend-winrttarget_vendor = "apple": nyquest-backend-nsurlsessionnyquest-backend-curlasync: Enable async support for backends and nyquest.blocking: Enable blocking support for backends and nyquest.multipart: Enable multipart form support for backends and nyquest.Refer to the backends' documentation for more optional features. For example, enable
charset-defaults for nyquest-backend-curl to perform encoding conversion automatically
when the response has an encoding other than UTF-8.
See nyquest#License.