|
| RpcContextImpl (const std::shared_ptr< SessionContext > &s, HttpVersion v=HttpVersion::HTTP1) |
|
std::shared_ptr< SessionContext > | get_session_context () const override |
|
virtual void | set_user_data (std::shared_ptr< void > data) override |
|
virtual void * | get_user_data () const override |
|
void | set_claims_digest (ccf::ClaimsDigest::Digest &&digest) override |
|
virtual const ccf::PathParams & | get_request_path_params () override |
|
virtual const ccf::PathParams & | get_decoded_request_path_params () override |
|
HttpVersion | get_http_version () const |
|
virtual void | set_error (ccf::http_status status, const std::string &code, std::string &&msg, const std::vector< nlohmann::json > &details={}) override |
| Construct error response, formatted as JSON OData.
|
|
void | set_error (ccf::ErrorDetails &&error) override |
| Construct error response, formatted as JSON OData.
|
|
void | set_response_json (const nlohmann::json &body, ccf::http_status status) override |
|
virtual void | set_tx_id (const ccf::TxID &tx_id)=0 |
|
virtual bool | should_apply_writes () const =0 |
|
virtual void | reset_response ()=0 |
|
virtual std::vector< uint8_t > | serialise_response () const =0 |
|
virtual const std::vector< uint8_t > & | get_serialised_request ()=0 |
|
virtual | ~RpcContext ()=default |
|
virtual const std::vector< uint8_t > & | get_request_body () const =0 |
|
virtual const std::string & | get_request_query () const =0 |
|
virtual const ccf::RESTVerb & | get_request_verb () const =0 |
|
virtual std::string | get_request_path () const =0 |
|
virtual std::string | get_method () const =0 |
|
virtual std::shared_ptr< ccf::http::HTTPResponder > | get_responder () const =0 |
|
virtual const http::HeaderMap & | get_request_headers () const =0 |
| Returns map of all headers found in the request.
|
|
virtual std::optional< std::string > | get_request_header (const std::string_view &name) const =0 |
|
virtual const std::string & | get_request_url () const =0 |
|
virtual ccf::FrameFormat | frame_format () const =0 |
|
virtual void | set_response_body (const std::vector< uint8_t > &body)=0 |
| Sets the main body or payload of the response.
|
|
virtual void | set_response_body (std::vector< uint8_t > &&body)=0 |
| Sets the main body or payload of the response.
|
|
virtual void | set_response_body (std::string &&body)=0 |
| Sets the main body or payload of the response.
|
|
virtual const std::vector< uint8_t > & | get_response_body () const =0 |
|
virtual void | set_response_status (int status)=0 |
| Sets initial status code summarising result of RPC.
|
|
virtual int | get_response_status () const =0 |
|
virtual void | set_response_header (const std::string_view &name, const std::string_view &value)=0 |
|
virtual void | set_response_header (const std::string_view &name, size_t n) |
|
virtual void | set_response_header (const http::HeaderKeyValue &kv) |
|
virtual void | clear_response_headers ()=0 |
|
virtual void | set_response_trailer (const std::string_view &name, const std::string_view &value)=0 |
|
virtual void | set_response_trailer (const std::string_view &name, size_t n) |
|
virtual void | set_response_trailer (const http::HeaderKeyValue &kv) |
|
virtual void | set_apply_writes (bool apply)=0 |
|