// Matrix Construct // // Copyright (C) Matrix Construct Developers, Authors & Contributors // Copyright (C) 2016-2019 Jason Volk // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice is present in all copies. The // full license for this software is available in the LICENSE file. #pragma once #define HAVE_IRCD_RESOURCE_REQUEST_H struct ircd::resource::request :json::object { template struct object; http::request::head head; string_view content; http::query::string query; vector_view parv; string_view param[8]; request(const http::request::head &head, const string_view &content) :json::object{content} ,head{head} ,content{content} ,query{this->head.query} {} request() = default; }; template struct ircd::resource::request::object :tuple { resource::request &r; const http::request::head &head; const string_view &content; const http::query::string &query; const vector_view &parv; const json::object &body; object(resource::request &r) :tuple{r} ,r{r} ,head{r.head} ,content{r.content} ,query{r.query} ,parv{r.parv} ,body{r} {} };