actix-web icon indicating copy to clipboard operation
actix-web copied to clipboard

contentType error

Open by965738071 opened this issue 2 years ago • 1 comments

#[derive(Debug, Serialize, Deserialize)]
pub struct UserRolesReq {
    pub user_id: u64,
    pub roles: Vec<u64>,
}
 #[post("auth_role")]
pub async fn auth_role(arg: Form<UserRolesReq>) -> HttpResponse {
    println!("{:?}", arg);

    //  UserService::auth_role(arg.into_inner()).await;

    todo!()
}

by965738071 avatar May 06 '22 09:05 by965738071

request contentType is x-www-form-urlencoded

by965738071 avatar May 06 '22 09:05 by965738071