Use http dependency directly

This commit is contained in:
Dirkjan Ochtman 2024-07-16 10:20:06 +02:00
parent 907becda46
commit 45102409d5
3 changed files with 5 additions and 4 deletions

View File

@ -20,6 +20,7 @@ ring = ["dep:ring", "hyper-rustls?/ring", "rcgen/ring"]
[dependencies]
aws-lc-rs = { version = "1.8.0", optional = true }
base64 = "0.21.0"
http = "1"
http-body-util = "0.1.2"
hyper = { version = "1.3.1", features = ["client", "http1", "http2"] }
hyper-rustls = { version = "0.27", default-features = false, features = ["http1", "http2", "native-tokio", "tls12", "rustls-native-certs"], optional = true }

View File

@ -9,10 +9,10 @@ use std::pin::Pin;
use std::sync::Arc;
use base64::prelude::{Engine, BASE64_URL_SAFE_NO_PAD};
use http::header::{CONTENT_TYPE, LOCATION};
use http::{Method, Request, Response, StatusCode};
use http_body_util::{BodyExt, Full};
use hyper::body::{Bytes, Incoming};
use hyper::header::{CONTENT_TYPE, LOCATION};
use hyper::{Method, Request, Response, StatusCode};
use hyper_util::client::legacy::connect::Connect;
use hyper_util::client::legacy::Client as HyperClient;
#[cfg(feature = "hyper-rustls")]

View File

@ -31,13 +31,13 @@ pub enum Error {
CryptoKey(#[from] crypto::KeyRejected),
/// HTTP failure
#[error("HTTP request failure: {0}")]
Http(#[from] hyper::http::Error),
Http(#[from] http::Error),
/// Hyper request failure
#[error("HTTP request failure: {0}")]
Hyper(#[from] hyper::Error),
/// Invalid ACME server URL
#[error("invalid URI: {0}")]
InvalidUri(#[from] hyper::http::uri::InvalidUri),
InvalidUri(#[from] http::uri::InvalidUri),
/// Failed to (de)serialize a JSON object
#[error("failed to (de)serialize JSON: {0}")]
Json(#[from] serde_json::Error),