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]
Construct error response, formatted according to the request content type (either JSON OData-formatted or gRPC error)
Implemented in ccf::RpcContextImpl.
◆ 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 |
Construct error response, formatted according to the request content type (either JSON OData-formatted or gRPC error)
Implemented in ccf::RpcContextImpl.
◆ 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 |