Class PluginRequest

Class Documentation

class PluginRequest

Thin read-only wrapper over an HTTP request. Hides the underlying HTTP library (currently cpp-httplib) from plugin code. Constructed by the gateway per-request; plugins receive it by const reference.

Public Functions

explicit PluginRequest(const void *impl)

Construct from opaque HTTP request pointer (gateway-internal).

std::string path_param(size_t index) const

Extract a path parameter by regex capture group index. Index 0 is the full match; index 1 is the first capture group.

std::string header(const std::string &name) const

Get a request header value by name. Returns empty string if not present.

const std::string &path() const

Full request path (e.g. “/api/v1/apps/my_app/data”).

const std::string &body() const

Request body (by reference - avoids copying large payloads).

std::string query_param(const std::string &name) const

Get a query parameter value by name. Returns empty string if not present.