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
Name | Type | Description |
---|---|---|
serverUrl | String | The URL of PrivMX Bridge server. |
memberToken | String | The authentication token provided by the server. |
method | String | The API endpoint to be called (HTTP method, such as POST, GET, etc.). |
paramsAsJson | String | The parameters to be sent with the request, formatted as a JSON string. |
Type | Description |
---|---|
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
Name | Type | Description |
---|---|---|
serverUrl | String | The URL of the PrivMX Bridge server. |
method | String | The API endpoint to be called (HTTP method, such as POST, GET, etc.). |
paramsAsJson | String | The parameters to be sent with the request, formatted as a JSON string. |
Type | Description |
---|---|
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
Name | Type | Description |
---|---|---|
serverUrl | String | The URL of the PrivMX Bridge server. |
apiKeyId | String | |
apiKeySecret | String | |
mode | Int64 | |
method | String | The API endpoint to be called (HTTP method, such as POST, GET, etc.). |
paramsAsJson | String | The parameters to be sent with the request, formatted as a JSON string. |
Type | Description |
---|---|
String | The result body as a `String`, representing the response from the backend. |