## Struct request

zeep::http::request

## Synopsis

    // In header: </build/libzeep-8SPbhu/libzeep-3.0.5/zeep/http/request.hpp>

    struct request {

      // public member functions
      boost::posix_time::ptime timestamp() const;
      void clear();
      float accept(const char *) const;
      bool is_mobile() const;
      bool keep_alive() const;
      std::string get_header(const char *) const;
      void remove_header(const char *);
      std::string get_request_line() const;
      std::string get_parameter(const char *) const;
      void to_buffers(std::vector< boost::asio::const_buffer > &);
      void debug(std::ostream &) const;

      // public data members
      std::string method;  // POST or GET.
      std::string uri;  // The uri as requested.
      int http_version_major;  // HTTP major number (usually 1)
      int http_version_minor;  // HTTP major number (0 or 1)
      std::vector< header > headers;  // A list with zeep::http::header values.
      std::string payload;  // For POST requests.
      bool close;  // Whether 'Connection: close' was specified.
      std::string username;  // The authenticated user for this request (filled in by webapp::validate_authentication)
      std::string local_address;  // The address the request was received upon.
      unsigned short local_port;  // The port number the request was received upon.
    };

## Description

request contains the parsed original HTTP request as received by the server.

### `request` public member functions

1.     boost::posix_time::ptime timestamp() const;

2.     void clear();

   Reinitialises request and sets timestamp.

3.     float accept(const char * type) const;

   Return the value in the Accept header for type.

4.     bool is_mobile() const;

   Check HTTP_USER_AGENT to see if it is a mobile client.

5.     bool keep_alive() const;

   Check for Connection: keep-alive header.

6.     std::string get_header(const char * name) const;

   Return the named header.

7.     void remove_header(const char * name);

   Remove this header from the list of headers.

8.     std::string get_request_line() const;

   Return the (reconstructed) request line.

9.     std::string get_parameter(const char * name) const;

   Alternative way to fetch parameters (as opposed to using webapp and `parameter_map`)

   Return the named parameter

10.     void to_buffers(std::vector< boost::asio::const_buffer > & buffers);

    Can be used in code that sends HTTP requests.

11.     void debug(std::ostream & os) const;