22#include "anch-rest-common-export.hpp"
33#include "codec/mediaType.hpp"
35#include "rest/headers.hpp"
36#include "rest/method.hpp"
61 std::vector<std::pair<std::string, std::string>> _query;
67 std::unique_ptr<std::istream> _body;
70 std::map<std::string, std::string, std::less<>> _pathParameters;
157 void setBody(std::unique_ptr<std::istream> body);
243 ANCH_REST_COMMON_EXPORT std::optional<std::
string>
percentDecode(std::string_view value,
bool plusAsSpace = false);
anch::rest::Method getMethod() const noexcept
void addQueryParameter(std::string_view name, std::string_view value)
bool hasBody() const noexcept
void setBody(std::unique_ptr< std::istream > body)
void setMethod(anch::rest::Method method) noexcept
Request(anch::rest::Method method, std::string_view target)
std::vector< anch::codec::MediaType > getAccept() const
std::optional< std::string_view > getPathParameter(std::string_view name) const
const std::string & getPath() const noexcept
void setPath(std::string_view path)
void setTarget(std::string_view target)
std::optional< std::string_view > getQueryParameter(std::string_view name) const
anch::rest::Headers & getHeaders() noexcept
const std::vector< std::pair< std::string, std::string > > & getQueryParameters() const noexcept
void setPathParameters(std::map< std::string, std::string, std::less<> > parameters)
std::optional< anch::codec::MediaType > getContentType() const
const std::map< std::string, std::string, std::less<> > & getPathParameters() const noexcept
std::istream & getBody() const
AnCH REST library namespace.
Definition auth.hpp:29
Method
Definition method.hpp:36
std::string percentEncode(std::string_view value)
std::optional< std::string > percentDecode(std::string_view value, bool plusAsSpace=false)
AnCH framework base namespace.
Definition app.hpp:30