/// Adds a OPTIONS request handler.
///
/// # Examples
///
/// ## Simple
///
/// ```rust
/// # use direkuta::prelude::*;
/// Direkuta::new()
///     .route(|r| {
///         r.options("/", |_, _, _| {
///             Response::new().with_body("Hello World!").build()
///         });
///     });
/// ```
///
/// ```rust,ignore
/// "/" : {  } {
///     OPTIONS => "Hello World!"
/// }
/// ```
Adds a OPTIONS request handler.
Adds a OPTIONS request handler .
pub fn options(
        &mut self,
        path: impl Into<String>,
        handler: impl Fn(Request, Arc<State>, Capture)
                -> Box<dyn Future<Item = response::Response<Body>, Error = DireError> + Send + 'static>
            + Send
            + Sync
            + 'static,
    ) {
        self.route(Method::OPTIONS, path, handler);
    }
pub fn options ( & mut self , path : impl Into < String > , handler : impl Fn ( Request , Arc < State > , Capture ) -> Box < dyn Future < Item = response :: Response < Body > , Error = DireError > + Send + ' static > + Send + Sync + ' static , ) { self . route ( Method :: OPTIONS , path , handler ) ; }
Adds a OPTIONS request handler.
Adds a OPTIONS request handler .
&mut self
path
impl Into<String>
handler
impl Fn(Request, Arc<State>, Capture)
                -> Box<dyn Future<Item = response::Response<Body>, Error = DireError> + Send + 'static>
            + Send
            + Sync
            + 'static
examples
None
simple
None
use direkuta::prelude::*;
None