[][src]Struct http_parser::parser::Request

pub struct Request<'a> {
    method: &'a str,
    request_uri: &'a str,
    http_version: &'a str,
    header: HashMap<&'a str, &'a str>,
    body: &'a str,
}

The HTTP request structure.

This structure tries to follow RFC 2616 Section 5 https://tools.ietf.org/html/rfc2616#section-5. Bellow you can see the expected request format.

Request = Request-Line
          *(( general-header
           | request-header
           | entity-header ) CRLF)
          CRLF
          [ message-body ]

The implementation may not be complete as it is a work in progress.

Fields

method: &'a str

The method of the request, it can be one of: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT

request_uri: &'a strhttp_version: &'a strheader: HashMap<&'a str, &'a str>body: &'a str

Implementations

impl<'a> Request<'a>[src]

fn new() -> Self[src]

Create a new Request.

Trait Implementations

impl<'a> Debug for Request<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Request<'a>

impl<'a> Send for Request<'a>

impl<'a> Sync for Request<'a>

impl<'a> Unpin for Request<'a>

impl<'a> UnwindSafe for Request<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.