Send a given request to the Runtime API. Use the client's base URI to ensure the API endpoint is correct.
(&self, req: Request<body::Body>)
| 50 | /// Send a given request to the Runtime API. |
| 51 | /// Use the client's base URI to ensure the API endpoint is correct. |
| 52 | pub fn call(&self, req: Request<body::Body>) -> BoxFuture<'static, Result<Response<Incoming>, BoxError>> { |
| 53 | // NOTE: This method returns a boxed future such that the future has a static lifetime. |
| 54 | // Due to limitations around the Rust async implementation as of Mar 2024, this is |
| 55 | // required to minimize constraints on the handler passed to [lambda_runtime::run]. |
| 56 | let req = match self.set_origin(req) { |
| 57 | Ok(req) => req, |
| 58 | Err(err) => return future::ready(Err(err)).boxed(), |
| 59 | }; |
| 60 | self.client.request(req).map_err(Into::into).boxed() |
| 61 | } |
| 62 | |
| 63 | /// Create a new client with a given base URI, HTTP connector, and optional pool size hint. |
| 64 | fn with(base: Uri, connector: HttpConnector, pool_size: Option<usize>) -> Self { |
nothing calls this directly
no test coverage detected