Skip to main content
reference

BackendRequester

Tool for direct requests to PrivMX Bridge.

Static Methods

backendRequest(serverUrl:memberToken:method:paramsAsJson:)

Performs a backend request to PrivMX Bridge. This method sends a request to PrivMX Bridge using its REST API with the appropriate authorization. The full Bridge API can be accessed using this method. The request is authenticated using a server token, and parameters are provided in JSON format.

public static func backendRequest(
serverUrl: String,
memberToken: String,
method: String,
paramsAsJson: String
) throws -> String

NameTypeDescription
serverUrlStringThe URL of PrivMX Bridge server.
memberTokenStringThe authentication token provided by the server.
methodStringThe API endpoint to be called (HTTP method, such as POST, GET, etc.).
paramsAsJsonStringThe parameters to be sent with the request, formatted as a JSON string.

TypeDescription
String The result body as a `String`, representing the response from the backend.

backendRequest(serverUrl:method:paramsAsJson:)

Performs a backend request to the PrivMX Bridge. This method sends a request to the PrivMX Bridge using its REST API.. The parameters are provided in JSON format.

public static func backendRequest(
serverUrl: String,
method: String,
paramsAsJson: String
) throws -> String

NameTypeDescription
serverUrlStringThe URL of the PrivMX Bridge server.
methodStringThe API endpoint to be called (HTTP method, such as POST, GET, etc.).
paramsAsJsonStringThe parameters to be sent with the request, formatted as a JSON string.

TypeDescription
String The result body as a `String`, representing the response from the backend.

backendRequest(serverUrl:apiKeyId:apiKeySecret:mode:method:paramsAsJson:)

Performs a backend request to the PrivMX Bridge. This method sends a request to the PrivMX Bridge using its REST API with the appropriate authorization. The full Bridge API can be accessed using this method. The request is authenticated using a server token, and parameters are provided in JSON format.

public static func backendRequest(
serverUrl: String,
apiKeyId: String,
apiKeySecret: String,
mode: Int64,
method: String,
paramsAsJson: String
) throws -> String

NameTypeDescription
serverUrlStringThe URL of the PrivMX Bridge server.
apiKeyIdString
apiKeySecretString
modeInt64
methodStringThe API endpoint to be called (HTTP method, such as POST, GET, etc.).
paramsAsJsonStringThe parameters to be sent with the request, formatted as a JSON string.

TypeDescription
String The result body as a `String`, representing the response from the backend.