mirror of
https://github.com/actix/examples
synced 2025-06-26 17:17:42 +02:00
add session ttl customization example
This commit is contained in:
@ -70,11 +70,16 @@ async fn handle_post_3(req: HttpRequest, params: web::Form<MyParams>) -> impl Re
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use actix_web::body::to_bytes;
|
||||
use actix_web::dev::{Service, ServiceResponse};
|
||||
use actix_web::http::{header::HeaderValue, header::CONTENT_TYPE, StatusCode};
|
||||
use actix_web::test::{self, TestRequest};
|
||||
use actix_web::web::{Bytes, Form};
|
||||
use actix_web::{
|
||||
body::to_bytes,
|
||||
dev::{Service, ServiceResponse},
|
||||
http::{
|
||||
header::{HeaderValue, CONTENT_TYPE},
|
||||
StatusCode,
|
||||
},
|
||||
test::{self, TestRequest},
|
||||
web::{Bytes, Form},
|
||||
};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
@ -1,13 +1,11 @@
|
||||
use std::fs;
|
||||
|
||||
use actix_multipart::Multipart;
|
||||
use actix_web::body::SizedStream;
|
||||
use actix_web::{delete, error};
|
||||
use actix_web::{
|
||||
get, middleware::Logger, post, web, App, Error, HttpResponse, HttpServer, Responder,
|
||||
body::SizedStream, delete, error, get, middleware::Logger, post, web, App, Error, HttpResponse,
|
||||
HttpServer, Responder,
|
||||
};
|
||||
use actix_web_lab::extract::Path;
|
||||
use actix_web_lab::respond::Html;
|
||||
use actix_web_lab::{extract::Path, respond::Html};
|
||||
use aws_config::meta::region::RegionProviderChain;
|
||||
use dotenv::dotenv;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@ -18,10 +16,7 @@ mod temp_file;
|
||||
mod upload_file;
|
||||
mod utils;
|
||||
|
||||
use self::client::Client;
|
||||
use self::temp_file::TempFile;
|
||||
use self::upload_file::UploadedFile;
|
||||
use self::utils::split_payload;
|
||||
use self::{client::Client, temp_file::TempFile, upload_file::UploadedFile, utils::split_payload};
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
Reference in New Issue
Block a user