Expand description
A highlevel API client framework for Rust.
Re-exports§
pub use serde_json;
pub use quick_xml;
Modules§
- DNS resolution
- HTTP header types
- multipart/form-data
Macros§
- Send request
- Send the payload as form
- Send the payload as JSON
- Send the payload as multipart form
- Send and get raw response
- Send the payload as XML, which will be serialized by quick_xml
Structs§
- This struct is used to sign request by using
access_token
- This struct is used to build an instance of ApiCore
- This struct is used to create HTTP request
- This struct is used to parse response body to json or xml
- This struct is used to parse response body to xml
ClientWithMiddleware
is a wrapper aroundreqwest::Client
which runs middleware on every request.- A
ClientBuilder
can be used to create aClient
with custom configuration. - This struct is used to parse
{code, data, message}
payload. - The DynamicForm is mixin of urlencoded form and multipart form
- A type map of protocol extensions.
- This struct is used to sign request by hashed token.
- This struct is used to parse response body to json
- This struct is used to control how to log. It could be injected into request as an extension.
- The Request Method (VERB)
- This middleware is used to mock the response
- This struct wraps
reqwest::multipart::Form
- Next encapsulates the remaining middleware chain to run in
Middleware::handle
. You can forward the request down the chain withrun
. - This struct is used to parse token
- A request which can be executed with
Client::execute()
. - This is a wrapper around
reqwest::RequestBuilder
exposing the same API. - This extension will set the
X-Request-ID
header - A Response to a submitted
Request
. - This struct is used to provides many SocketAddrs
- This struct is used to parse response body to text
- This extension will set the
X-Trace-ID
and/orX-Span-ID
header - A parsed URL record.
- This struct is used to parse response body to xml
Enums§
- This enum holds
access_token
, which used to sign request - Api Error
- This enum represents the position of request to carry token.
- Hash algorithm
- Re-export log::LevelFilter An enum representing the available verbosity level filters of the logger.
- MimeType (aka. ContentType)
- This enum represents the payload of respones
- Token Error
Traits§
- This trait is used to authenticate request
- This trait is used to performing DNS queries
- This trait provides form related functions
- When attached to a
ClientWithMiddleware
(generally usingwith_init
), it is run whenever the client starts building a request, in the order it was attached. - This trait is used to create
LevelFilter
- A trait to try to convert some type into a
Url
. - This trait is used to extract result from response.
- When attached to a
ClientWithMiddleware
(generally usingwith
), middleware is run whenever the client issues a request, in the order it was attached. - Provides functions to update multipart form
- Reply a response to request. It should be used with MockServer.
- This trait is used to generate token
- This trait provides URL related functions
- This trait is used to rewrite base_url
- This trait is used to update carrier
Functions§
- Set the log level as global default
Type Aliases§
- An alias of Result<T, ApiError
- This extractor will treat whole payload as result
Attribute Macros§
- Refine a method of HTTP api
- Declare a HTTP api with base_url