Update the poem example, too
Signed-off-by: Jim Crossley <jim@crossleys.org>
This commit is contained in:
parent
24bbf941b1
commit
2672f64935
|
|
@ -7,7 +7,7 @@ edition = "2021"
|
||||||
cloudevents-sdk = { path = "../..", features = ["poem"] }
|
cloudevents-sdk = { path = "../..", features = ["poem"] }
|
||||||
tokio = { version = "1.13", features = ["macros", "rt-multi-thread"] }
|
tokio = { version = "1.13", features = ["macros", "rt-multi-thread"] }
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
poem = { version = "=1.0.23" }
|
poem = { version = "1" }
|
||||||
tracing-subscriber = "0.2"
|
tracing-subscriber = "0.2"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ async fn main() -> Result<(), std::io::Error> {
|
||||||
}
|
}
|
||||||
tracing_subscriber::fmt::init();
|
tracing_subscriber::fmt::init();
|
||||||
|
|
||||||
let server = Server::new(TcpListener::bind("127.0.0.1:8080")).await?;
|
let server = Server::new(TcpListener::bind("127.0.0.1:8080"));
|
||||||
server.run(echo_app()).await
|
server.run(echo_app()).await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -79,7 +79,7 @@ mod tests {
|
||||||
.header("content-type", "application/json")
|
.header("content-type", "application/json")
|
||||||
.body(Body::from_json(&j).unwrap());
|
.body(Body::from_json(&j).unwrap());
|
||||||
|
|
||||||
let resp: Response = app.call(request).await;
|
let resp: Response = app.call(request).await.unwrap();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
resp.headers()
|
resp.headers()
|
||||||
.get("ce-specversion")
|
.get("ce-specversion")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue