No changes yet.
-
responses::OAuthConfigurationandClient#oauth_configurationwere removed because the endpoint they were relying on is no longer available in RabbitMQ4.3.0In earlier versions the endpoint hasn't been used by RabbitMQ's management UI since
3.11.0
QueueInfo#operator_policyandQueueInfo#effective_policy_definitionare new functions that expose a couple of new-ish queue metrics to this client
-
Fixes propagation of
x-max-age,x-max-length-bytes,x-stream-max-segment-size-bytesarguments upon stream declaration -
Compilation with default feature set was broken due to a feature-conditional
use
ExchangeTypenow covers the non-standard exchange types shipped with RabbitMQ core or Tanzu RabbitMQ:ConsistentHashing,ModulusHash,Random,LocalRandom,JmsTopic,RecentHistory,DelayedMessage,MessageDeduplication, plus aPlugin(String)catch-all for arbitrary plugin exchange typesExchangeType::ModulusHashis a new value for thex-modulus-hashexchange, which is included into RabbitMQ core as of4.3.0(previously it was a part of therabbitmq-shardingplugin)
HttpClientErrorDisplaymessages now include the underlying error details forRequestError,InvalidHeaderValue,IncompatibleBody, andEndpointValidationError::ClientBuildError
reqwestupgraded to0.13.2
- Publishing to
crates.ionow uses Trusted Publishing
- A new feature,
zeroize, together with a new type,Password, that offers zeroisation for the most security-demanding use cases
- SSRF hardening:
ClientBuilder#buildnow returnsResult<Client, EndpointValidationError>and rejects endpoints that do not use anhttporhttpsscheme
ClientBuilder#with_redirect_policycontrols the HTTP redirect policy.with_recommended_defaultsnow also disables redirectsEndpointValidationErrorandRedirectPolicyare re-exported from bothapiandblocking_api
ClusterNode#rabbitmq_versionnow takes the version straight from theGET /api/nodesorGET /api/nodes/{name}responses, if available (starting with RabbitMQ4.2.4). The function falls back to therabbitErlang/OTP application version on older nodesClusterNodegained a few new optional fields available since RabbitMQ4.2.4:erlang_version,erlang_full_version,crypto_lib_versionOverview#crypto_lib_versionis a new field reporting the crypto library (such as OpenSSL, LibreSSL) version used by the node's runtime. Only provided by RabbitMQ4.2.4and later versions.
- New
HttpClientErrorhelpers for "transport-level" connection error classification:is_connection_error,is_timeout,is_tls_handshake_error,as_reqwest_error Client#probe_reachabilitytests whether the node is reachable and the configured credentials are accepted. Returns aReachabilityProbeOutcomeenum rather than aResultbecause both outcomes are expected, so using the?operator would be semantically wrong- Improved
TagListergonomics withcan_access_http_api,is_administrator,can_access_monitoring_endpoints TagListnow implementsFrom<Vec<String>>ClientBuilder#with_connect_timeoutsets the TCP connection timeout independently of the overall request timeout
responses::Listener#human_friendly_nameis a new method that returns a human-friendly name for the listener: for example, "MQTT over WebSockets with TLS" forhttps/web-mqtt(a cryptic internal listener name)
- Introduce
ClusterNode#rabbitmq_versionthat relies on the Erlang/OTP application version. Yeah, the HTTP API could lend us a hand here but so far hasn't.
- Documentation improvements
regexbumped to1.12tokiobumped to1.49percent-encodingbumped to2.3
Amqp091ShovelParamsno longer serializessrc-predeclared,dest-predeclaredwhen those keys arefalsefor RabbitMQ 3.12.x compatibility
-
ExchangeFederationParams#queue_typeandOwnedExchangeFederationParams#queue_typeare now optional (Option<QueueType>instead ofQueueType) for RabbitMQ 3.12.x compatibility.The
queue-typeparameter was introduced in the 3.13 series. -
NodeMemoryBreakdown#other_ets_tablesis nowi64instead ofu64because it can be reported as negative due to an ETS table memory accounting peculiarity in RabbitMQ before 4.2.3.
reqwestupgraded to0.13.1
- New
RuntimeParameterpredicates:is_shovel,is_federation_upstream,is_federation_upstream_set,is_federation,is_policy,is_operator_policy,is_vhost_limits
ClientBuilder#with_recommended_defaultsapplies sensible defaults: 60s request timeout, 3 retries with 1s delayHttpClientErrornow has helper methods:is_not_found,is_already_exists,is_unauthorized,is_forbidden,is_client_error,is_server_error,status_code,url,error_details- New policies-related functions:
Client#list_policies_for_target,Client#list_operator_policies_for_target,Client#list_matching_policies,Client#list_matching_operator_policies OptionalQueueArgumentis a new enum for type-safe optional queue argumentsXArgumentsBuilder#with_argumentacceptsOptionalQueueArgumentdirectlyAmqp091ShovelSourceEndpoint,Amqp091ShovelDestinationEndpointmake type-safe shovel endpoint configuration easier- Owned variants of param types:
OwnedQueueParams,OwnedExchangeParams,OwnedPolicyParams,OwnedUserParams,OwnedAmqp091ShovelSourceEndpoint,OwnedAmqp091ShovelDestinationEndpoint - The library has accumulated two
OverflowBehaviorimplementations; they were folded into thecommonversion and re-exported from therequestsmodule
SupportedProtocol::fromnow correctly mapshttps/web-amqptoAMQPOverWebSocketsWithTLS
PaginationParamsconstructors now clamp values exceedingMAX_PAGE_SIZEinstead of panicking- New convenience methods for listing queues by type:
Client#list_quorum_queues,Client#list_quorum_queues_in,Client#list_classic_queues,Client#list_classic_queues_in,Client#list_streams,Client#list_streams_in Client#delete_queuesfor batch queue deletionVirtualHostParamsBuilderfor fluent virtual host parameter constructionUserParams#policymakerconvenience constructor
- Support for pagination with
Client#list_connections_paged,Client#list_queues_paged,Client#list_queues_in_paged,PaginationParams - API ergonomics improvements:
XArgumentsBuilder,PolicyDefinitionBuilder,HttpClientError#user_message,PolicyParamsimprovements, and a few more convenience methods onClient
- Improve
tabledcolumn names forAuthenticationAttemptStatistics.
- Add two more aliases to
SupportedProtocol::AMQPfor the authentication attempts statistics endpoint.
- Request errors now include the
errorandreasonfields populated if the API response contains them
Overview#has_jit_enabledis a new method that returnstrueif the Erlang runtime has the JIT enabled
- Reintroduced
QueueOps#has_queue_ttl_arg, which was unintentionally lost during a refactoring
- Reintroduced
QueueOps#is_server_named, which was unintentionally lost during a refactoring
Client#list_all_cluster_pluginsis a new function that returns a combined set of plugins enabled across all cluster nodesClient#list_node_pluginsis a new function that returns the list of plugins enabled on a specific node
-
Logging via the
logcrate. Both clients now emit trace-level logs for HTTP operations, including request/response details and retry attempts. -
HTTP request timeout support. Both
ClientBuilderimplementations now provide awith_request_timeoutmethod for configuring request timeouts:use std::time::Duration; use rabbitmq_http_client::api::ClientBuilder; let client = ClientBuilder::new() .with_endpoint("http://localhost:15672/api") .with_basic_auth_credentials("user", "pass") .with_request_timeout(Duration::from_secs(30)) .build();
The timeout applies to the entire request/response cycle. If a request takes longer than the configured duration, it will be aborted and return a timeout error.
Note that this new setting is ignored if a custom HTTP client is provided via
ClientBuilder#with_client. In that case, configure the timeout directly on the custom client instead.
-
HTTP request retry support. Both
ClientBuilderimplementations now allow for minimalistic retry behavior configuration: the number of retry attempts and the fixed delay between them.use rabbitmq_http_client::api::{ClientBuilder, RetrySettings}; let client = ClientBuilder::new() .with_endpoint("http://localhost:15672/api") .with_basic_auth_credentials("user", "pass") .with_retry_settings(RetrySettings { // 2 retry attempts (+ 1 initial = 3 total attempts) max_attempts: 2, // a fixed wait of 500 ms between retries delay_ms: 500, }) .build();
NodeMemoryFootprint#breakdownis now anOption<NodeMemoryBreakdown>to handle cases where the node memory breakdown stats are not yet available.
NodeMemoryTotals#maxnow correctly compares all three memory totals (RSS, allocated, and used by runtime) instead of comparing RSS twice.
-
All
delete_*andclear_*functions now accept anidempotentlyboolean argument, making it possible to issue idempotent deletion requests that would not fail with a404 Not Foundresponse.This affects the following functions:
delete_federation_upstreamdelete_policydelete_operator_policyclose_connectionclose_user_connectionsdelete_bindingclear_topic_permissionsdelete_shovelclear_runtime_parameter
-
delete_bindingnow accepts arequests::BindingDeletionParamsstruct instead of a long list of arguments.
- All
delete_*functions now support idempotent operations.
responses::Shovelcan now be converted torequests::RuntimeParameterDefinition, for example, when a shovel needs to be updated
crate::apiwas split into multiple smaller modules,crate::api::*. Re-exports are provided for backwards compatibility.- Similarly,
crate::blocking_apiwas split into multiple smaller modules,crate::blocking_api::*, with re-exports in place. - Similarly,
crate::requestswas split into multiple smaller modules,crate::requests::*. crate::requestswas split into multiple smaller modules,crate::requests::*.- Similarly,
crate::responseswas split into multiple smaller modules,crate::responses::*, with re-exports in place.
- Optimized
uris::UriBuilderfor updates of multiple query parameters
- Fix several
uris::UriBuilderbugs around query parameter updates
FederationUpstreamandFederationUpstreamParamsno longer have a "fidelity gap," a difference between fields that had made it impossible to convert the former into the latterFederationUpstreamnow includes several missing (rarely used) fields such asbind_using_nowait,channel_use_mode
FederationUpstream#prefetch_countandFederationUpstream#reconnect_delaywere bumped tou32
-
uris::UriBuilderis a convenient way of modifying URIs used by federation upstreams and shovels. Itsreplaceandmergemethods are now much more efficient as they no longer rebuild the URI query string multiple times.use rabbitmq_http_client::uris::UriBuilder; use rabbitmq_http_client::commons::TlsPeerVerificationMode; let uri = UriBuilder::new("amqps://user:pass@localhost:5671/vhost") .unwrap() .with_tls_peer_verification(TlsPeerVerificationMode::Enabled) .with_ca_cert_file("/path/to/ca_bundle.pem") .build() .unwrap();
-
uris::TlsClientSettingsmakes it possible to group TLS settings and apply them to auris::UriBuilderin one go.use rabbitmq_http_client::uris::{TlsClientSettings, UriBuilder}; use rabbitmq_http_client::commons::TlsPeerVerificationMode; let settings = TlsClientSettings::new() .peer_verification(TlsPeerVerificationMode::Enabled) .ca_cert_file("/path/to/ca_bundle.pem"); let uri = UriBuilder::new("amqps://user:pass@localhost:5671/vhost?verify=verify_none") .unwrap() .replace(settings) .build() .unwrap();
-
commons::TlsPeerVerificationModeis a new enum representing TLS peer verification modes -
commons::TLS_PEER_VERIFICATION_KEYis a new constant for theverifykey used by federation and shovel URIs, and more
VirtualHostDefinitionSetTransformertrait andVirtualHostTransformationChainfor transforming virtual host-specific definition sets- Virtual host equivalents of cluster-wide transformers:
PrepareForQuorumQueueMigrationVhost,StripCmqKeysFromVhostPolicies,DropEmptyVhostPolicies PrepareForQuorumQueueMigrationandPrepareForQuorumQueueMigrationVhosttransformers now also strip CMQ-related x-arguments (such asx-ha-mode) from queues definitions, as they won't pass validation on RabbitMQ4.x
responses::TagList,responses::PluginList,responses::XArguments,responses::NodeList,responses::MessageList,responses::FeatureFlagList,responses::DeprecatedFeatureListnow all implementDerefandDerefMutresponses::Channel#statenow uses an enum,responses::ChannelState, instead of a string.Client#enable_vhost_deletion_protectionprotects a virtual host from deletion (using thePOST /api/vhosts/{vhost}/deletion/protectionendpoint).Client#disable_vhost_deletion_protectionlifts deletion protection (using theDELETE /api/vhosts/{vhost}/deletion/protectionendpoint).Client#auth_attempts_statisticsis a new function providing support for theGET /api/auth/attempts/{node}endpoint.Client#list_topic_permissionsis a new function that provides support for theGET /api/topic-permissionsendpoint.Client#list_topic_permissions_inis a new function that provides support for theGET /api/vhosts/{vhost}/topic-permissionsendpoint.Client#get_topic_permissions_ofis a new function that provides support for theGET /api/topic-permissions/{vhost}/{user}endpoint.Client#list_channels_onis a new function that provides support for theGET /api/connections/{connection}/channelsendpoint.Client#get_channel_inforeturns information about a specific channel.Client#current_useris a new function providing support for theGET /api/whoamiendpoint.
Client#delete_bindingcould panic if the optionalx-argumentsvalue was passed in asNoneapi::Client#enable_schema_definition_sync_on_nodewas unintentionally namedenable_schema_definition_sync_one_node
blocking_api::Client#enable_schema_definition_sync,blocking_api::Client#disable_schema_definition_syncwere removed in favor ofblocking_api::Client#enable_schema_definition_sync_on_nodeandblocking_api::Client#disable_schema_definition_sync_on_nodethat accept anOption<&str>for name, like inapi::Client.Nonemeans "on all cluster nodes."
- Adopted a few type aliases:
common::Username,common::VirtualHostName,common::PermissionPattern,common::ChannelId. responses::TagList,responses::PluginList,responses::NodeList,responses::FeatureFlagList,responses::DeprecatedFeatureListnow implementcontains.
responses::TagList,responses::PluginList,responses::FeatureFlagList,responses::DeprecatedFeatureList,responses::MessageListnow all havelenandis_emptymethods.responses::TagList,responses::PluginList,responses::NodeList,responses::FeatureFlagList,responses::DeprecatedFeatureList,responses::MessageListnow all implementIntoIterator.
responses::NodeList#lenis now properly accompanied byresponses::NodeList#is_empty.
responses::ClusterIdentitynow implementsToString,From<String>, andFrom<&str>.responses::NodeList#lenis a new function that returns the length of the list.
QueueOps#x_arguments: returns the optional arguments of an object (XArguments).QueueOps#has_queue_ttl_arg: returns true if optional arguments of an object include a queue TTL argument ("x-expires").QueueOps#has_message_ttl_arg: returns true if optional arguments of an object include a message TTL argument ("x-message-ttl").QueueOps#has_length_limit_in_messages: returns true if optional arguments of an object include a queue length limit in messages ("x-max-length").QueueOps#has_length_limit_in_bytes: returns true if optional arguments of an object include a queue length limit in bytes ("x-max-length-bytes").QueueOps#is_server_named: returns true if an object's name suggests it is a server-named (system) entity.
- New struct,
requests::TopicPermissions, for declaring topic permissions. - New struct,
responses::TopicPermissionfor representing topic permissions. Client#list_topic_permissions_ofis a new function that lists topic permissions of a user.Client#grant_permissionsis now an alias forClient#declare_permissions, providing an easier to remember alias.Client#declare_topic_permissionsis a new function that sets topic permissions for a userClient#clear_topic_permissionsis a new function to clear topic permissions for a user.
responses::MessagingProtocolwas updated to include a new variant,MessagingProtocol::Local, that represents a "protocol" used by local shovels in RabbitMQ 4.2.0 and later.
-
responses::VirtualHost#metadatais now optional. It was introduced in RabbitMQ3.8.0in 2019 but for various reasons can be missing in versions up to3.11.0or so.This can be considered a RabbitMQ
3.10.x(that reached EOL in late 2023) compatibility fix. Responsible adults don't run EOL versions of RabbitMQ, of course.
responses::Shovel.vhostis now an option because this field will be missing for static shovels.
Client#list_shovels_inis a new function that returns a list of shovels in a specific virtual hostShovelStatenow includes one more state,ShovelState::Terminated
- Several structs in
responsesnow implementDefault, in particular for deserialization, and can handle the cases with certain metrics missing at request time on a freshly booted RabbitMQ node
- Support for a new deprecated feature flag state column, introduced in rabbitmq/rabbitmq-server#14227
Client#declare_policiesandClient#declare_operator_policiesare two new helper functions for declaring multiple policies at once. Note that both functions will still issue the same number of API requests, so it only exists for convenienceClient#delete_policies_inandClient#delete_operator_policies_inare two new helper functions for deleting multiple policies at once. Note that both functions will still issue the same number of API requests, so it only exists for convenience
- Introduce
password_hashing::HashingAlgorithmwith two variants, SHA-256 and SHA-512 - Support for SHA-512 hashing of salted passwords
responses::PolicyDefinitionOpswas extended and renamed toresponses::OptionalArgumentSourceOps
-
New
DefinitionSetTransformer:PrepareForQuorumQueueMigration.This one not only strips off the CMQ-related keys but also handles an incompatible
"overflow"/"x-overflow"key value and"queue-mode"/"x-queue-mode"keys, both not supported by quorum queues. -
responses::OptionalArgumentSourceOpsnow supports more operations on optional queue arguments ofresponses::QueueDefinitionas well as policy definitions (responses::PolicyDefinition,responses::Policy)
-
responses::Connectioncan now represent direct connections, a special kind of connections supported by the Erlang AMQP 0-9-1 client, that shovels and federation links use when connecting to the local node.GitHub issues: rabbitmq/rabbitmqadmin-ng#68, #61
-
ClientCapabilitiesfields now default tofalsewhen not provided in the API response.GitHub issue: #56.
tabledwas upgraded to0.20.0
-
NoActiveProtocolListenerDetailswas split intoNoActiveProtocolListenerDetailsPre41andNoActiveProtocolListenerDetails41AndLaterto supportGET /api/health/checks/protocol-listener/{protocols}responses of both RabbitMQ 4.0.x and 4.1.x.Relevant RabbitMQ change: rabbitmq/rabbitmq-server#13871.
- Minor helper functions, such as
Policy#with_overridesandPolicyDefinition#merge
-
PolicyDefinition#insertandPolicy#insert_definition_keyare new functions for adding or updating policy definition key-value pairs -
responses::Policycan now be converted torequests::PolicyParamsfor easier policy definition updates -
More flexible use of optional
reqwestfeatures.Contributed by @ikrivosheev.
GitHub issue: #53.
Client#list_global_runtime_parameters,Client#get_global_runtime_parameter,Client#upsert_global_runtime_parameter,Client#clear_global_runtime_parameterare new functions for working with global runtime parametersClient#get_cluster_tags,Client#set_cluster_tags,Client#clear_cluster_tagsare new functions for operations on cluster tags
PolicyDefinitionand specificallyrequests::PolicyParams.definitionis now aMap<String, Value>and not anOption<Map<String, Value>>. When creating a policy, the definition cannot be missing or blank, or else it would not pass server validation.
-
Federation support. Key API elements:
FederationUpstreamParams,QueueFederationParams,ExchangeFederationParams,FederationUpstream,FederationLink,Client#declare_federation_upstream_with_parameters,Client#declare_federation_upstream,Client#delete_federation_upstream,Client#list_federation_upstreams,Client#list_federation_links -
New definition set transformations that include certain parts of the definition set:
exclude_users,exclude_permissions,exclude_runtime_parameters,exclude_policies
-
ClusterDefinitionSettransformations are maturing.There are two
transformations::DefinitionSetTransformers available: one that removes the 3.13.x era policy queues related to classic queue mirroring, and another that removes policies with empty definitions.The two are supposed to be used together.
-
ClientBuilder<E, U, P>now has a default type parameter value.Contributed by @ikrivosheev.
GitHub issue: #46
-
QueueOps,NamedPolicyTargetObjectare two new traits that allow key queue properties to be accessed on several structs that semantically represent a queue, either directly or in an exported set of definitions -
QueueType::Unsupported(String)is a new queue type variant -
Initial functions for mutating certain parts of
ClusterDefinitionSets
PolicyTarget#does_apply_tois a new function that allows forPolicyTargetequivalence comparison. For example,PolicyTarget::QuorumQueuesis a subset ofPolicyTarget::QueuesbutPolicyTarget::QuorumQueuesis not
-
Client#declare_amqp10_shovelis a new function that declares a dynamic shovel where both source and destination use AMQP 1.0 -
Both
Amqp091ShovelSourceParamsandAmqp091ShovelDestinationParamsnow support a new boolean option,predeclared, that enables either or both sides to rely on a pre-declared topology
RuntimeParameterDefinition#name,RuntimeParameterDefinition#vhost, andRuntimeParameterDefinition#componenttypes changed fromStringto&str
-
Client#declare_amqp091_shovelis a new function that declares a dynamic shovel where both source and destination use AMQP 0-9-1 -
Client#delete_shovelis a new function for deleting shovels
-
Client#import_vhost_definitionsis a new function that imports virtual host-specific definition files (as opposed to cluster-wide ones) into the target virtual host -
Client#import_cluster_wide_definitionsis an alias toClient#import_definitionsto better reflect what it does
-
responses::VirtualHostDefinitionSetis an equivalent ofresponses::ClusterDefinitionSetbut adapted for the specifics of virtual host-specific definitions, namely the fact that they do not contain virtual hosts, users, or permissions, and objects such as queues or bindings do not have the virtual host field to make it possible to import them into a virtual host with any name -
Client#export_vhost_definitions,Client#export_vhost_definitions_as_stringandClient#export_vhost_definitions_as_dataare new functions that export virtual host-specific definitions (as opposed to cluster-wide ones)
-
responses::DefinitionSetwas renamed toresponses::ClusterDefinitionSetto differentiate it from virtual host-specific definitions, which are from now on represented byresponses::VirtualHostDefinitionSet -
Client#export_definitionswas renamed toClient#export_cluster_wide_definitions -
Client#export_definitions_as_stringwas renamed toClient#export_cluster_wide_definitions_as_string -
Client#export_definitions_as_datawas renamed toClient#export_cluster_wide_definitions_as_data
Client#close_user_connectionsis a new function that closes all connections that authenticated with a specific username
-
Client#disable_schema_definition_syncwas renamed toClient#disable_schema_definition_sync_on_node.This breaking change only applies to a function specific to Tanzu RabbitMQ 4.1, a series currently in development.
-
Client#enable_schema_definition_syncwas renamed toClient#enable_schema_definition_sync_on_node.This breaking change only applies to a function specific to Tanzu RabbitMQ 4.1, a series currently in development.
-
Client#disable_schema_definition_syncnow disables SDS on all cluster nodes.This function is specific to Tanzu RabbitMQ 4.1, a series currently in development.
-
Client#enable_schema_definition_syncnow enables SDS on all cluster nodes.This function is specific to Tanzu RabbitMQ 4.1, a series currently in development.
responses::Connection#channel_maxis now anOption<u16>because this metric won't be available for, say, RabbitMQ Stream Protocol connections
-
New convenience functions for working with streams:
Client#get_stream_info,Client#delete_stream -
Client#declare_streamandrequests::StreamParamsfor convenient stream declaration
-
Initial support for Tanzu RabbitMQ Schema Definitions Sync (SDS) operations.
-
Initial support for Tanzu RabbitMQ Warm Standby Replication (WSR) operations.
-
Isolated test suite runs for each client.
To run only the async client tests, use
cargo test async --all-featuresTo run only the blocking client tests, use
cargo test blocking --all-features
- Async
Client#delete_*functions now correctly handleNotFoundresponses for idempotent deletes
api::Clientnow computes API endpoint paths correctly (a slash was missing)
Client#get_node_memory_footprintis a new function that returns a node memory footprint breakdown.responses::NodeMemoryFootprintandresponses::NodeMemoryBreakdownare the key types that provide access to per-category proportions, both absolute and relative (in percent)
-
New
responses::HealthCheckFailureDetailsvariants to accommodate active port and protocol listener health checks -
New health check function:
Client#health_check_protocol_listener
-
New functions for listing stream connections, publishers and consumers:
Client#list_stream_publishers,Client#list_stream_publishers_in,Client#list_stream_publishers_of,Client#list_stream_publishers_on_connection,Client#list_stream_consumers,Client#list_stream_consumers_in,Client#list_stream_consumers_on_connection,Client#list_stream_connections,Client#list_stream_connections_in -
New health check function:
Client#health_check_port_listener
Client#list_feature_flags,Client#enable_feature_flag,Client#enable_all_stable_feature_flagsare three new functions for working with feature flags
-
Client#list_all_deprecated_featuresandClient#list_deprecated_features_in_useare new functions for listing all deprecated features and only those whose use is detected in the cluster. -
Client#list_feature_flagsis a new function that lists all feature flags in the cluster, including their state and stability.
- Bumps minimum
reqwestversion to0.12.11
-
To propagate more request context to the caller,
crate::error::Errorwas updated to provide a request URL, a header map, and a request body (if available).This reason for doing this comes down to how
reqwest'sResponsefunctions are designed: the ones that consume and parse the body also consumeself, which means propagating aResponseto the caller is not very useful at best, and arguably is misleading.