Skip to content

Commit 09d6ca2

Browse files
committed
Remove isahc support
1 parent c53c5f1 commit 09d6ca2

File tree

4 files changed

+0
-29
lines changed

4 files changed

+0
-29
lines changed

.cspell.json

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"Dirkjan",
3838
"EPYC",
3939
"hasher",
40-
"isahc",
4140
"Isobel",
4241
"jaegertracing",
4342
"Kühle",

Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ futures-executor = "0.3"
2525
futures-util = { version = "0.3", default-features = false }
2626
hyper = { version = "0.14", default-features = false }
2727
http = { version = "0.2", default-features = false }
28-
isahc = { version = "1.4", default-features = false }
2928
log = "0.4.21"
3029
once_cell = "1.13"
3130
ordered-float = "4.0"

opentelemetry-http/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ async-trait = { workspace = true }
1818
bytes = { workspace = true }
1919
http = { workspace = true }
2020
hyper = { workspace = true, features = ["http2", "client", "tcp"], optional = true }
21-
isahc = { workspace = true, optional = true }
2221
opentelemetry = { version = "0.23", path = "../opentelemetry", features = ["trace"] }
2322
reqwest = { workspace = true, features = ["blocking"], optional = true }
2423
tokio = { workspace = true, features = ["time"], optional = true }

opentelemetry-http/src/lib.rs

-26
Original file line numberDiff line numberDiff line change
@@ -99,32 +99,6 @@ mod reqwest {
9999
}
100100
}
101101

102-
#[cfg(feature = "isahc")]
103-
mod isahc {
104-
use crate::ResponseExt;
105-
106-
use super::{async_trait, Bytes, HttpClient, HttpError, Request, Response};
107-
use isahc::AsyncReadResponseExt;
108-
use std::convert::TryInto as _;
109-
110-
#[async_trait]
111-
impl HttpClient for isahc::HttpClient {
112-
async fn send(&self, request: Request<Vec<u8>>) -> Result<Response<Bytes>, HttpError> {
113-
let mut response = self.send_async(request).await?;
114-
let mut bytes = Vec::with_capacity(response.body().len().unwrap_or(0).try_into()?);
115-
response.copy_to(&mut bytes).await?;
116-
117-
let headers = std::mem::take(response.headers_mut());
118-
let mut http_response = Response::builder()
119-
.status(response.status().as_u16())
120-
.body(bytes.into())?;
121-
*http_response.headers_mut() = headers;
122-
123-
Ok(http_response.error_for_status()?)
124-
}
125-
}
126-
}
127-
128102
#[cfg(feature = "hyper")]
129103
pub mod hyper {
130104
use crate::ResponseExt;

0 commit comments

Comments
 (0)