axum-htmx icon indicating copy to clipboard operation
axum-htmx copied to clipboard

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

Open AlexEscalante opened this issue 9 months ago • 0 comments

I have this code, with that error message:

` pub async fn all_patients( TypedHeader(hx): TypedHeader<HxRequest>, Extension(db): Extension<Arc<Database>>, ... // 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?

AlexEscalante avatar May 09 '25 02:05 AlexEscalante