Our new developer documentation is now available. Please check it out!
OdinRoom.WebRequestToken
public IEnumerator WebRequestToken(string url, string jsonPayload)
public IEnumerator WebRequestToken(string url, string jsonPayload, UnityAction<DownloadHandler> response)
Uses UnityWebRequest with POST data as json to get a response from a token-server
Info
Default callback will set OdinRoom with the response plain text
Parameters
Name | Type | Description |
---|---|---|
url | String | Token-Server endpoint |
jsonPayload | String | Request data |
response | UnityAction<DownloadHandler> | Response callback |
Returns
Type | Description |
---|---|
IEnumerator | IEnumerator for Coroutine |
Variants
WebRequestToken(url, jsonPayload)
public IEnumerator WebRequestToken(string url, string jsonPayload)
Uses UnityWebRequest with POST data as json to get a response from a token-server
Warning
Default callback will set OdinRoom with the response plain text
Parameters
Name | Type | Description |
---|---|---|
url | String | Token-Server endpoint |
jsonPayload | String | Request data |
Returns
Type | Description |
---|---|
IEnumerator | IEnumerator for Coroutine |
WebRequestToken(url, jsonPayload, response)
public IEnumerator WebRequestToken(string url, string jsonPayload, UnityAction<DownloadHandler> response)
Uses UnityWebRequest with POST data as json to get a response from a token-server
Parameters
Name | Type | Description |
---|---|---|
url | String | Token-Server endpoint |
jsonPayload | String | Request data |
response | UnityAction<DownloadHandler> | Response callback |
Returns
Type | Description |
---|---|
IEnumerator | IEnumerator for Coroutine |