Developer Documentation

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

NameTypeDescription
urlStringToken-Server endpoint
jsonPayloadStringRequest data
responseUnityAction<DownloadHandler>Response callback

Returns

TypeDescription
IEnumeratorIEnumerator 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

NameTypeDescription
urlStringToken-Server endpoint
jsonPayloadStringRequest data

Returns

TypeDescription
IEnumeratorIEnumerator 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

NameTypeDescription
urlStringToken-Server endpoint
jsonPayloadStringRequest data
responseUnityAction<DownloadHandler>Response callback

Returns

TypeDescription
IEnumeratorIEnumerator for Coroutine