A static class containing utility methods for making HTTP requests and handling responses in the Emergence SDK.


static bool RequestError(UnityWebRequest request)

Checks if there was an error in the UnityWebRequest result.

static void PrintRequestResult(string name, UnityWebRequest request)

Prints the result of a UnityWebRequest to the console.

static bool ProcessRequest(UnityWebRequest request, ErrorCallback errorCallback, out T response)

Processes a UnityWebRequest response and returns the result as a response object.

static bool ProcessResponse(UnityWebRequest request, out BaseResponse response, out BaseResponse errorResponse)

Processes the response of a UnityWebRequest and returns the result as a response object or an error response object.

static async UniTask<string> PerformAsyncWebRequest(string url, string method, ErrorCallback errorCallback, string bodyData = "", Dictionary<string, string> headers = null)

Performs an asynchronous UnityWebRequest and returns the result as a string.

Last updated