Skip to content

Is it possible to use the extractors with axum-extra::TypedHeaders? #30

@AlexEscalante

Description

@AlexEscalante

I have this code, with that error message:

`
pub async fn all_patients(
TypedHeader(hx): TypedHeader,
Extension(db): Extension<Arc>,
... // other params
) -> Result<impl IntoResponse, AppError> {
...

if hx { // <-- "Mismatched types expected 'bool', found 'HxRequest'
...
} else {
...
}
}
`

Seems to me like I can't use both libraries together... Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions