|
virtual void | ccf::RpcContext::set_response_body (const std::vector< uint8_t > &body)=0 |
| Sets the main body or payload of the response.
|
|
virtual void | ccf::RpcContext::set_response_body (std::vector< uint8_t > &&body)=0 |
| Sets the main body or payload of the response.
|
|
virtual void | ccf::RpcContext::set_response_body (std::string &&body)=0 |
| Sets the main body or payload of the response.
|
|
virtual const std::vector< uint8_t > & | ccf::RpcContext::get_response_body () const =0 |
|
virtual void | ccf::RpcContext::set_response_status (int status)=0 |
| Sets initial status code summarising result of RPC.
|
|
virtual int | ccf::RpcContext::get_response_status () const =0 |
|
virtual void | ccf::RpcContext::set_response_header (const std::string_view &name, const std::string_view &value)=0 |
|
virtual void | ccf::RpcContext::set_response_header (const std::string_view &name, size_t n) |
|
virtual void | ccf::RpcContext::set_response_header (const http::HeaderKeyValue &kv) |
|
virtual void | ccf::RpcContext::clear_response_headers ()=0 |
|
virtual void | ccf::RpcContext::set_response_trailer (const std::string_view &name, const std::string_view &value)=0 |
|
virtual void | ccf::RpcContext::set_response_trailer (const std::string_view &name, size_t n) |
|
virtual void | ccf::RpcContext::set_response_trailer (const http::HeaderKeyValue &kv) |
|
virtual void | ccf::RpcContext::set_response_json (const nlohmann::json &body, http_status status)=0 |
|
virtual void | ccf::RpcContext::set_error (http_status status, const std::string &code, std::string &&msg, const std::vector< nlohmann::json > &details={})=0 |
| Construct error response, formatted as JSON OData.
|
|
virtual void | ccf::RpcContext::set_error (ccf::ErrorDetails &&error)=0 |
| Construct error response, formatted as JSON OData.
|
|
Methods to set sections of response, which will be serialised and transmitted to client.
◆ clear_response_headers()
virtual void ccf::RpcContext::clear_response_headers |
( |
| ) |
|
|
pure virtual |
◆ get_response_body()
virtual const std::vector< uint8_t > & ccf::RpcContext::get_response_body |
( |
| ) |
const |
|
pure virtual |
◆ get_response_status()
virtual int ccf::RpcContext::get_response_status |
( |
| ) |
const |
|
pure virtual |
◆ set_error() [1/2]
◆ set_error() [2/2]
virtual void ccf::RpcContext::set_error |
( |
http_status |
status, |
|
|
const std::string & |
code, |
|
|
std::string && |
msg, |
|
|
const std::vector< nlohmann::json > & |
details = {} |
|
) |
| |
|
pure virtual |
◆ set_response_body() [1/3]
virtual void ccf::RpcContext::set_response_body |
( |
const std::vector< uint8_t > & |
body | ) |
|
|
pure virtual |
◆ set_response_body() [2/3]
virtual void ccf::RpcContext::set_response_body |
( |
std::string && |
body | ) |
|
|
pure virtual |
◆ set_response_body() [3/3]
virtual void ccf::RpcContext::set_response_body |
( |
std::vector< uint8_t > && |
body | ) |
|
|
pure virtual |
◆ set_response_header() [1/3]
◆ set_response_header() [2/3]
virtual void ccf::RpcContext::set_response_header |
( |
const std::string_view & |
name, |
|
|
const std::string_view & |
value |
|
) |
| |
|
pure virtual |
◆ set_response_header() [3/3]
virtual void ccf::RpcContext::set_response_header |
( |
const std::string_view & |
name, |
|
|
size_t |
n |
|
) |
| |
|
inlinevirtual |
◆ set_response_json()
virtual void ccf::RpcContext::set_response_json |
( |
const nlohmann::json & |
body, |
|
|
http_status |
status |
|
) |
| |
|
pure virtual |
◆ set_response_status()
virtual void ccf::RpcContext::set_response_status |
( |
int |
status | ) |
|
|
pure virtual |
◆ set_response_trailer() [1/3]
◆ set_response_trailer() [2/3]
virtual void ccf::RpcContext::set_response_trailer |
( |
const std::string_view & |
name, |
|
|
const std::string_view & |
value |
|
) |
| |
|
pure virtual |
◆ set_response_trailer() [3/3]
virtual void ccf::RpcContext::set_response_trailer |
( |
const std::string_view & |
name, |
|
|
size_t |
n |
|
) |
| |
|
inlinevirtual |