setting up more for idk, rust servers i guess

This commit is contained in:
Chris Cochrun 2023-05-26 16:36:56 -05:00
parent 09f3ea62f2
commit d8740cdb73
4 changed files with 35 additions and 4 deletions

View file

@ -1,5 +1,6 @@
use std::{env, io};
use actix_web::{middleware, web, App, HttpServer, get, post, Responder, http::header::ContentType, HttpResponse, HttpRequest, http::{StatusCode, Method}};
use actix_web::{middleware, web, App, HttpServer, get, post, Responder, http::header::ContentType, HttpResponse, HttpRequest, http::{StatusCode, Method}, HttpMessage};
use multer::Multipart;
#[actix_web::main]
async fn main() -> io::Result<()> {
@ -21,5 +22,9 @@ async fn main() -> io::Result<()> {
#[post("/health-form")]
async fn form(req: HttpRequest) -> HttpResponse {
println!("{req:?}");
println!("{:?}", req.content_type());
println!("{:?}", req);
println!("{:?}", req.headers().get("content-type"));
// let multipart = Multipart::new(stream, boundary);
HttpResponse::Ok().respond_to(&req)
}