mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 00:50:20 +02:00
simplify http response construction; deprecate httpcodes
This commit is contained in:
@@ -32,18 +32,18 @@ header! {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// use actix_web::httpcodes;
|
||||
/// use actix_web::HttpResponse;
|
||||
/// use actix_web::http::header::IfNoneMatch;
|
||||
///
|
||||
/// let mut builder = httpcodes::HttpOk.build();
|
||||
/// let mut builder = HttpResponse::Ok();
|
||||
/// builder.set(IfNoneMatch::Any);
|
||||
/// ```
|
||||
///
|
||||
/// ```rust
|
||||
/// use actix_web::httpcodes;
|
||||
/// use actix_web::HttpResponse;
|
||||
/// use actix_web::http::header::{IfNoneMatch, EntityTag};
|
||||
///
|
||||
/// let mut builder = httpcodes::HttpOk.build();
|
||||
/// let mut builder = HttpResponse::Ok();
|
||||
/// builder.set(
|
||||
/// IfNoneMatch::Items(vec![
|
||||
/// EntityTag::new(false, "xyzzy".to_owned()),
|
||||
|
Reference in New Issue
Block a user