actix-web
actix-web copied to clipboard
contentType error
#[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!()
}
request contentType is x-www-form-urlencoded