magpie
Loading...
Searching...
No Matches
magpie::Request Struct Reference

Public Member Functions

Result< std::vector< Cookie >, CookieParseError > parseCookies () const

Public Attributes

std::unordered_map< std::string, std::string > headers
std::string body
std::string ipAddr
Method::HttpMethod method

Member Data Documentation

◆ body

std::string magpie::Request::body

Contains the body for non-streamed endpoints.

◆ ipAddr

std::string magpie::Request::ipAddr

Contains the IP address associated with this request. Depending on AppConfig options, this value is one of:

  1. The IP address associated with the connection
  2. The IP addres specified by X-Real-IP (requires AppConfig::trustXRealIp = true)

◆ method

Method::HttpMethod magpie::Request::method

The HTTP method for this request. This is typically inferred by the endpoint, but if you use the same handler for multiple methods, you may need to use this to differentiate between methods.

Using the multiple handler for different methods is discouraged, however.


The documentation for this struct was generated from the following files:
  • src/magpie/transfer/Request.hpp
  • src/magpie/transfer/Request.cpp