Skip to content

Feature Request: Allow web::JsonBody<T> || web::Json<T> from request #2762

@borngraced

Description

@borngraced

Your issue may already be reported!
Please search on the Actix Web issue tracker before creating one.

Expected Behavior

Hi team, thank you for your extraordinaire work in the actix echo system!.

There's a featured I really needed to use while building an API route in actix but it seems to be in nonexistence yet.

I would like to be able to pass web::Json<T> (where T can match any json params passed to a req) instead of explicitly specifying T.

Will this be possible or perhaps it's already in existence ...?

Current Behavior

returns

the trait bound `JsonBody<_>: FromRequest` is not satisfied
required because of the requirements on the impl of `FromRequest` for `(Data<tokio_postgres::Client>, HttpRequest, JsonBody<_>)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions