Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use allocatedCase instead of allocated #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -97,7 +97,7 @@ object NatchezMiddleware {
implicit ev: MonadCancel[F, Throwable]
): Client[F] =
Client { req =>
Resource {
Resource.applyFull { cancelable =>
Trace[F].span("http4s-client-request") {
for {
knl <- Trace[F].kernel
Expand All @@ -106,7 +106,7 @@ object NatchezMiddleware {
"client.http.method" -> req.method.toString
)
reqʹ = req.withHeaders(knl.toHttp4sHeaders ++ req.headers) // prioritize request headers over kernel ones
rsrc <- client.run(reqʹ).allocated
rsrc <- cancelable(client.run(reqʹ).allocatedCase)
_ <- Trace[F].put("client.http.status_code" -> rsrc._1.status.code.toString())
} yield rsrc
}
Expand Down