Attach this range as the body of `request`. The body is rebuilt on every call, since a streamed body is consumed by the request that sends it.
(&self, request: reqwest::RequestBuilder)
| 173 | /// Attach this range as the body of `request`. The body is rebuilt on every call, |
| 174 | /// since a streamed body is consumed by the request that sends it. |
| 175 | async fn attach(&self, request: reqwest::RequestBuilder) -> Result<reqwest::RequestBuilder> { |
| 176 | let body = self.content.body(self.offset, self.length).await?; |
| 177 | Ok(request.header("Content-Length", self.length).body(body)) |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | /// Failure of one attempt of an upload request |
no test coverage detected