Skip to main content
reference

BackendRequester

namespace: privmx::endpoint::core

BackendRequester provides functions to call PrivMX Bridge API.

Static Methods

backendRequest

Sends a request to PrivMX Bridge API using access token for authorization.

static std::string backendRequest(
const std::string &serverUrl
const std::string &accessToken
const std::string &method
const std::string &paramsAsJson
)

NameTypeDescription
serverUrlconst std::string &PrivMX Bridge server URL
accessTokenconst std::string &token for authorization (see PrivMX Bridge API for more details)
methodconst std::string &API method to call
paramsAsJsonconst std::string &API method's parameters in JSON format

TypeDescription
std::string JSON string representing raw server response

backendRequest

Sends request to PrivMX Bridge API.

static std::string backendRequest(
const std::string &serverUrl
const std::string &method
const std::string &paramsAsJson
)

NameTypeDescription
serverUrlconst std::string &PrivMX Bridge server URL
methodconst std::string &API method to call
paramsAsJsonconst std::string &API method's parameters in JSON format

TypeDescription
std::string JSON string representing raw server response

backendRequest

Sends a request to PrivMX Bridge API using pair of API KEY ID and API KEY SECRET for authorization.

static std::string backendRequest(
const std::string &serverUrl
const std::string &apiKeyId
const std::string &apiKeySecret
const int64_t mode
const std::string &method
const std::string &paramsAsJson
)

NameTypeDescription
serverUrlconst std::string &PrivMX Bridge server URL
apiKeyIdconst std::string &API KEY ID (see PrivMX Bridge API for more details)
apiKeySecretconst std::string &API KEY SECRET (see PrivMX Bridge API for more details)
modeconst int64_tallows you to set whether the request should be signed (mode = 1) or plain (mode = 0)
methodconst std::string &API method to call
paramsAsJsonconst std::string &API method's parameters in JSON format

TypeDescription
std::string JSON string representing raw server response