Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

ModIO.APIClient.SendRequest[T]

Jackson Wood edited this page Mar 6, 2019 · 7 revisions

APIClient.SendRequest

public static void SendRequest(UnityWebRequest webRequest, Action<T> successCallback, Action<WebRequestError> errorCallback);

Parameters

Name Description
webRequest Request to send and attach the callback functions to
successCallback Action to execute if the request succeeds
errorCallback Action to execute if the request returns an error

Description

A wrapper for sending a web request to mod.io and parsing the result.

Calls SendWebRequest on the UnityWebRequest and attaches the callbacks to the UnityWebRequestAsyncOperation that is created (via ModIO.APIClient.SendRequest) and additionally attempts to parse the response from the mod.io server as an object of type T.

Clone this wiki locally