Description:
Trying to call the Openapi SDK client from an Actix-web async handler:
async fn get_user() -> impl Responder {
let client = openapi_sdk::Client::new("API_KEY");
let user = client.get_user(123).await.unwrap();
HttpResponse::Ok().json(user)
}
Getting: error: future cannot be sent between threads safely.
Probably related to Actix’s runtime. How should we properly integrate Openapi SDK async calls with Actix?