We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Sample usage showing how to call "hello" Azure Function API:
using RESTClient; using System;
public class RESTDemo : MonoBehaviour { // Use this for initialization void Start () { StartCoroutine( SayHello(SayHelloCompleted) ); } private IEnumerator SayHello(Action<IRestResponse<string>> callback = null) { RestRequest request = new RestRequest("https://***.azurewebsites.net/api/hello", Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddQueryParam("code", "***"); request.AddBody("{\"name\": \"unity\"}"); yield return request.Request.Send(); request.GetText(callback); } private void SayHelloCompleted(IRestResponse<string> response) { if (response.IsError) { Debug.LogError("Request error:" + response.StatusCode); return; } Debug.Log("Completed:" + response.Content); } }