Skip to content

Commit 58e139e

Browse files
PeppyDaysduke8253
authored andcommitted
Add ResponseHeader in pingora_http crate's prelude
For import consistency, put ResponseHeader into pingora_http crate's prelude. This enables importing with `use pingora::prelude::*` to bring ResponseHeader and RequestHeader together. Fixes #551. Includes-commit: e074c23 Replicated-from: #554
1 parent fb3401d commit 58e139e

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

.bleep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
03479bcb7e6312754af45a43f6cdd173538a3cc2
1+
32a7a7b8037c590b5e845c24f12e74d02b4ead92

docs/user_guide/rate_limiter.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Pingora provides a crate `pingora-limits` which provides a simple and easy to us
2020
```rust
2121
use async_trait::async_trait;
2222
use once_cell::sync::Lazy;
23-
use pingora::http::ResponseHeader;
2423
use pingora::prelude::*;
2524
use pingora_limits::rate::Rate;
2625
use std::sync::Arc;
@@ -164,4 +163,4 @@ You can run the pre-made example code in the [`pingora-proxy` examples folder](h
164163
165164
```
166165
cargo run --example rate_limiter
167-
```
166+
```

pingora-http/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ pub use case_header_name::IntoCaseHeaderName;
4343

4444
pub mod prelude {
4545
pub use crate::RequestHeader;
46+
pub use crate::ResponseHeader;
4647
}
4748

4849
/* an ordered header map to store the original case of each header name

pingora/examples/client.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
// limitations under the License.
1414

1515
use pingora::{connectors::http::Connector, prelude::*};
16-
use pingora_http::RequestHeader;
1716
use regex::Regex;
1817

1918
#[tokio::main]

0 commit comments

Comments
 (0)