Update the poem example, too

Signed-off-by: Jim Crossley <jim@crossleys.org>
This commit is contained in:
Jim Crossley 2022-01-05 17:46:48 -05:00
parent 24bbf941b1
commit 2672f64935
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ edition = "2021"
cloudevents-sdk = { path = "../..", features = ["poem"] }
tokio = { version = "1.13", features = ["macros", "rt-multi-thread"] }
tracing = "0.1"
poem = { version = "=1.0.23" }
poem = { version = "1" }
tracing-subscriber = "0.2"
serde_json = "1.0"

View File

@ -46,7 +46,7 @@ async fn main() -> Result<(), std::io::Error> {
}
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
}
@ -79,7 +79,7 @@ mod tests {
.header("content-type", "application/json")
.body(Body::from_json(&j).unwrap());
let resp: Response = app.call(request).await;
let resp: Response = app.call(request).await.unwrap();
assert_eq!(
resp.headers()
.get("ce-specversion")