Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/TrueLayer/reqwest-middleware
/ functions
Functions
111 in github.com/TrueLayer/reqwest-middleware
⨍
Functions
111
◇
Types & classes
27
↓ 31 callers
Method
build
Returns a `ClientWithMiddleware` using this builder configuration.
reqwest-middleware/src/client.rs:84
↓ 20 callers
Method
clone
(&self)
reqwest-tracing/src/middleware.rs:22
↓ 19 callers
Method
with
Convenience method to attach middleware. If you need to keep a reference to the middleware after attaching, use [`with_arc`]. [`with_arc`]: Self::wi
reqwest-middleware/src/client.rs:48
↓ 12 callers
Method
set_inner
(&mut self, key: &str, value: String)
reqwest-tracing/src/otel.rs:112
↓ 6 callers
Method
request
Start building a `Request` with the `Method` and `Url`. Returns a `RequestBuilder`, which will allow setting headers and the request body before send
reqwest-middleware/src/client.rs:178
↓ 5 callers
Method
get
Convenience method to make a `GET` request to a URL. # Errors This method fails whenever the supplied `Url` cannot be parsed.
reqwest-middleware/src/client.rs:121
↓ 5 callers
Function
remove_credentials
Removes the username and/or password parts of the url, if present.
reqwest-tracing/src/reqwest_otel_span_builder.rs:351
↓ 5 callers
Method
run
( mut self, req: Request, extensions: &'a mut Extensions, )
reqwest-middleware/src/middleware.rs:94
↓ 5 callers
Method
send
Constructs the Request and sends it to the target URL, returning a future Response. # Errors This method fails if there was an error while sending r
reqwest-middleware/src/client.rs:581
↓ 5 callers
Method
status
Returns the status code, if the error was generated from a response.
reqwest-middleware/src/error.rs:135
↓ 4 callers
Method
timeout
(self, timeout: std::time::Duration)
reqwest-middleware/src/client.rs:426
↓ 4 callers
Method
uri
Returns the uri in which the server is listening to.
reqwest-retry/tests/all/helpers/simple_server.rs:69
↓ 3 callers
Method
start
Starts the TcpListener and handles the requests.
reqwest-retry/tests/all/helpers/simple_server.rs:74
↓ 2 callers
Function
default_on_request_end
(span: &Span, outcome: &Result<Response>)
reqwest-tracing/src/reqwest_otel_span_builder.rs:74
↓ 2 callers
Function
default_span_name
(req: &'a Request, ext: &'a Extensions)
reqwest-tracing/src/reqwest_otel_span_builder.rs:127
↓ 2 callers
Method
execute_with_extensions
Executes a `Request` with initial [`Extensions`]. A `Request` can be built manually with `Request::new()` or obtained from a RequestBuilder with `Req
reqwest-middleware/src/client.rs:219
↓ 2 callers
Function
get_header_value
(key: &str, headers: &reqwest::header::HeaderMap)
reqwest-tracing/src/reqwest_otel_span_builder.rs:82
↓ 2 callers
Method
handle
( &self, req: Request, extensions: &mut Extensions, next: Next<'_>, )
reqwest-retry/src/middleware.rs:115
↓ 2 callers
Function
make_echo_request_in_otel_context
(client: ClientWithMiddleware)
reqwest-tracing/src/otel.rs:215
↓ 2 callers
Method
set_custom_handler
( &mut self, custom_handler: impl Fn(TcpStream) -> BoxFuture<'static, Result<(), Box<dyn std::
reqwest-retry/tests/all/helpers/simple_server.rs:57
↓ 2 callers
Method
url
Returns a possible URL related to this error.
reqwest-middleware/src/error.rs:25
↓ 1 callers
Method
build_split
Build a `Request`, which can be inspected, modified and executed with `ClientWithMiddleware::execute()`. This is similar to [`RequestBuilder::build()
reqwest-middleware/src/client.rs:533
↓ 1 callers
Function
classify_io_error
(error: &std::io::Error)
reqwest-retry/src/retryable_strategy.rs:189
↓ 1 callers
Function
default_on_request_failure
Default request failure retry strategy. Will only retry if the request failed due to a network error
reqwest-retry/src/retryable_strategy.rs:134
↓ 1 callers
Function
default_on_request_failure
(span: &Span, e: &Error)
reqwest-tracing/src/reqwest_otel_span_builder.rs:105
↓ 1 callers
Function
default_on_request_success
Default request success retry strategy. Will only retry if: The status was 5XX (server error) The status was 408 (request timeout) or 429 (too many r
reqwest-retry/src/retryable_strategy.rs:113
↓ 1 callers
Function
default_on_request_success
(span: &Span, response: &Response)
reqwest-tracing/src/reqwest_otel_span_builder.rs:89
↓ 1 callers
Method
execute
Executes a `Request`. A `Request` can be built manually with `Request::new()` or obtained from a RequestBuilder with `RequestBuilder::build()`. You
reqwest-middleware/src/client.rs:202
↓ 1 callers
Method
execute_with_retry
This function will try to execute the request, if it fails with an error classified as transient it will call itself to retry the request.
reqwest-retry/src/middleware.rs:137
↓ 1 callers
Method
extensions
Returns a mutable reference to the internal set of extensions for this request
reqwest-middleware/src/client.rs:556
↓ 1 callers
Method
find
Find the templated path from the actual path. Returns the templated path if a match is found. ``` # use reqwest_tracing::OtelPathNames; let path_nam
reqwest-tracing/src/reqwest_otel_span_builder.rs:310
↓ 1 callers
Method
get_bad_request_response
Returns the raw HTTP response in case of a 400 Bad Request.
reqwest-retry/tests/all/helpers/simple_server.rs:157
↓ 1 callers
Method
get_response
Returns the response to use based on the calls counter. It uses a round-robin mechanism.
reqwest-retry/tests/all/helpers/simple_server.rs:147
↓ 1 callers
Function
get_span_status
HTTP Mapping <https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md#status> Maps t
reqwest-tracing/src/reqwest_otel_span_builder.rs:185
↓ 1 callers
Method
handle
( &self, req: Request, extensions: &mut Extensions, next: Next<'_>, )
reqwest-middleware/src/middleware.rs:60
↓ 1 callers
Method
handle_connection
Asyncrounously reads from the buffer and handle the request. It first checks that the format is correct, then returns the response. Returns a 400 if
reqwest-retry/tests/all/helpers/simple_server.rs:97
↓ 1 callers
Method
headers
Add a set of Headers to the existing ones on this Request. The headers will be merged in to any already set.
reqwest-middleware/src/client.rs:361
↓ 1 callers
Method
init
(&self, req: RequestBuilder)
reqwest-middleware/src/req_init.rs:30
↓ 1 callers
Function
inject_opentelemetry_context_into_request
Injects the given OpenTelemetry Context into a reqwest::Request headers to allow propagation downstream.
reqwest-tracing/src/otel.rs:7
↓ 1 callers
Method
is_body
Returns true if the error is related to the request or response body.
reqwest-middleware/src/error.rs:119
↓ 1 callers
Method
is_builder
Returns true if the error is from a type `Builder`.
reqwest-middleware/src/error.rs:70
↓ 1 callers
Method
is_connect
Returns true if the error is related to connect.
reqwest-middleware/src/error.rs:111
↓ 1 callers
Method
is_decode
Returns true if the error is related to decoding the response's body.
reqwest-middleware/src/error.rs:127
↓ 1 callers
Method
is_redirect
Returns true if the error is from a `RedirectPolicy`.
reqwest-middleware/src/error.rs:78
↓ 1 callers
Method
is_request
Returns true if the error is related to the request.
reqwest-middleware/src/error.rs:102
↓ 1 callers
Method
is_timeout
Returns true if the error is related to a timeout.
reqwest-middleware/src/error.rs:94
↓ 1 callers
Method
try_clone
Attempt to clone the RequestBuilder. `None` is returned if the RequestBuilder can not be cloned, i.e. if the request body is a stream. # Examples `
reqwest-middleware/src/client.rs:606
↓ 1 callers
Method
with_arc
Add middleware to the chain. [`with`] is more ergonomic if you don't need the `Arc`. [`with`]: Self::with
reqwest-middleware/src/client.rs:58
↓ 1 callers
Method
with_arc_init
Add a request initialiser to the chain. [`with_init`] is more ergonomic if you don't need the `Arc`. [`with_init`]: Self::with_init
reqwest-middleware/src/client.rs:78
↓ 1 callers
Method
with_extension
Inserts the extension into this request builder
reqwest-middleware/src/client.rs:550
↓ 1 callers
Method
with_init
Convenience method to attach a request initialiser. If you need to keep a reference to the initialiser after attaching, use [`with_arc_init`]. [`wit
reqwest-middleware/src/client.rs:68
Function
assert_retry_on_connection_reset_by_peer
()
reqwest-retry/tests/all/retry.rs:318
Function
assert_retry_on_hyper_canceled
()
reqwest-retry/tests/all/retry.rs:267
Function
assert_retry_on_incomplete_message
()
reqwest-retry/tests/all/retry.rs:212
Function
assert_retry_on_request_timeout
()
reqwest-retry/tests/all/retry.rs:177
Method
basic_auth
Enable HTTP basic authentication. ```rust # use anyhow::Error; # async fn run() -> Result<(), Error> { let client = reqwest_middleware::ClientWithMi
reqwest-middleware/src/client.rs:390
Method
bearer_auth
Enable HTTP bearer authentication.
reqwest-middleware/src/client.rs:402
Method
body
Set the request body.
reqwest-middleware/src/client.rs:413
Method
call
(&mut self, req: Request)
reqwest-middleware/src/client.rs:287
Function
context_no_propagated
()
reqwest-tracing/src/otel.rs:489
Method
default
()
reqwest-tracing/src/middleware.rs:28
Method
delete
Convenience method to make a `DELETE` request to a URL. # Errors This method fails whenever the supplied `Url` cannot be parsed.
reqwest-middleware/src/client.rs:157
Method
fmt
(&self, f: &mut fmt::Formatter<'_>)
reqwest-retry/tests/all/helpers/simple_server.rs:29
Method
fmt
(&self, f: &mut fmt::Formatter)
reqwest-middleware/src/client.rs:241
Method
form
Send a form body. Sets the body to the url encoded serialization of the passed value, and also sets the `Content-Type: application/x-www-form-urlenco
reqwest-middleware/src/client.rs:496
Method
from
(_status: &reqwest::Error)
reqwest-retry/src/retryable.rs:24
Method
from
(client: Client)
reqwest-middleware/src/client.rs:231
Method
from_client
This method allows creating a ClientBuilder from an existing ClientWithMiddleware instance
reqwest-middleware/src/client.rs:35
Method
from_parts
Assemble a builder starting from an existing `Client` and a `Request`.
reqwest-middleware/src/client.rs:334
Method
from_reqwest_response
Try to map a `reqwest` response into `Retryable`. Returns `None` if the response object does not contain any errors.
reqwest-retry/src/retryable.rs:18
Function
get_header_value_for_span_attribute
()
reqwest-tracing/src/reqwest_otel_span_builder.rs:377
Function
get_source_error_type
( err: &dyn std::error::Error, )
reqwest-retry/src/retryable_strategy.rs:200
Method
handle
(&self, res: &Result<reqwest::Response, Error>)
reqwest-retry/src/retryable_strategy.rs:98
Method
handle
( &self, req: Request, extensions: &mut Extensions, next: Next<'_>, )
reqwest-tracing/src/middleware.rs:39
Method
head
Convenience method to make a `HEAD` request to a URL. # Errors This method fails whenever the supplied `Url` cannot be parsed.
reqwest-middleware/src/client.rs:166
Method
header
Add a `Header` to this Request.
reqwest-middleware/src/client.rs:345
Method
is_middleware
Returns true if the error is from any middleware.
reqwest-middleware/src/error.rs:62
Method
is_status
Returns true if the error is from `Response::error_for_status`.
reqwest-middleware/src/error.rs:86
Method
json
(self, json: &T)
reqwest-middleware/src/client.rs:515
Method
known_paths
Create a new [`OtelPathNames`] from a set of known paths. Paths in this set will be found with `find`. Paths can have different parameters: - Named
reqwest-tracing/src/reqwest_otel_span_builder.rs:286
Method
middleware
(err: E)
reqwest-middleware/src/error.rs:17
Method
multipart
(self, multipart: multipart::Form)
reqwest-middleware/src/client.rs:435
Method
new
(retries: u32, status_code: u16)
reqwest-retry/tests/all/retry.rs:21
Method
new
Creates an instance of a [`SimpleServer`] If [`port`] is None os Some(0), it gets randomly chosen between the available ones.
reqwest-retry/tests/all/helpers/simple_server.rs:37
Method
new
(client: &'a Client, middlewares: &'a [Arc<dyn Middleware>])
reqwest-middleware/src/middleware.rs:87
Method
new
(client: Client)
reqwest-middleware/src/client.rs:25
Method
new
()
reqwest-tracing/src/middleware.rs:14
Method
new
(request: &'a mut Request)
reqwest-tracing/src/otel.rs:106
Method
new_with_policy
Construct `RetryTransientMiddleware` with a [retry_policy][RetryPolicy].
reqwest-retry/src/middleware.rs:79
Method
new_with_policy_and_strategy
Construct `RetryTransientMiddleware` with a [retry_policy][RetryPolicy] and [retryable_strategy](RetryableStrategy).
reqwest-retry/src/middleware.rs:98
Method
on_request_end
(span: &Span, outcome: &Result<Response>, _: &mut Extensions)
reqwest-tracing/src/reqwest_otel_span_builder.rs:155
Method
on_request_start
(req: &Request, ext: &mut Extensions)
reqwest-tracing/src/reqwest_otel_span_builder.rs:150
Method
parse_request_line
Parses the request line and checks that it contains the method, uri and http_version parts. It does not check if the content of the checked parts is c
reqwest-retry/tests/all/helpers/simple_server.rs:129
Method
patch
Convenience method to make a `PATCH` request to a URL. # Errors This method fails whenever the supplied `Url` cannot be parsed.
reqwest-middleware/src/client.rs:148
Method
poll
(mut self: Pin<&mut Self>, cx: &mut Context<'_>)
reqwest-middleware/src/client.rs:273
Method
poll_ready
(&mut self, cx: &mut Context<'_>)
reqwest-middleware/src/client.rs:283
Method
post
Convenience method to make a `POST` request to a URL. # Errors This method fails whenever the supplied `Url` cannot be parsed.
reqwest-middleware/src/client.rs:130
Method
put
Convenience method to make a `PUT` request to a URL. # Errors This method fails whenever the supplied `Url` cannot be parsed.
reqwest-middleware/src/client.rs:139
Method
query
Modify the query string of the URL. Modifies the URL of this request, adding the parameters provided. This method appends and does not overwrite. Thi
reqwest-middleware/src/client.rs:461
Function
remove_credentials_from_url_without_credentials_is_noop
()
reqwest-tracing/src/reqwest_otel_span_builder.rs:387
next →
1–100 of 111, ranked by callers