Category "actix-web"

Actix-Web reports "App data is not configured" when processing a file upload

I'm using the Actix framework to create a simple server and I've implemented a file upload using a simple HTML frontend. use actix_web::web::Data; use actix_we

Rust actix-web middleware modifying request data

Is there a recommended way of modifying the request received on actix-web. Is there an example on how to modify I am looking for way to add data to the request

How to config payload limit for a actix websocket server

I am learning Actix and try creating a WebSocket service code snippets: starts server pub async fn start(addr: &str) -> std::result::Result<(), IoErro

How use postgres (deadpool-postgres) with WebSocket Actix (actix-web-actors)

How to use database connection from a WebSocket handler. It is possible to use future.into_actor or ctx.spawn or actix::fut::wrap_future but that's not accurate

How to mock function on unit test actix web

I have an api service that has 2 layer: api and repository. The api layer is where the request handling and business logic defined, while repository is a databa

How to get the body of a Response in actix_web unit test?

I'm building a web API service with Rust and actix_web. I want to test a route and check if the received response body is what I expect. But I'm struggling with

How to get the body of a Response in actix_web unit test?

I'm building a web API service with Rust and actix_web. I want to test a route and check if the received response body is what I expect. But I'm struggling with

actix_web invalid header provided

I am getting this error running an actix-web based server ERROR actix_http::h1::dispatcher] stream error: Request parse error: Invalid Header provided The hand

How do I configure actix-web to accept CORS requests from any origin?

I am building a REST API with actix-web. How do I configure CORS to accept requests from any origin? Cors::new() // <- Construct CORS middleware builder