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 handler code is this:
#[derive(Serialize, Deserialize)]
pub struct Data {
some_data: String
};
async fn handler_post(
request: HttpRequest,
data: web::Json<Data>
) -> impl Responder {
HttpResponse::OK()
.json(ApiResponse {
status: "success"
})
}
The headers being sent are accept, Content-Type and User-Agent. I don't know how to make it work. By the way, i'm using actix-web 4.
Cargo.toml
in your question. – Maryettamaryjane