Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

how to do a web request unity

IEnumerator SendRequest(string url)
    {
        UnityWebRequest request = UnityWebRequest.Get(url);
        yield return request.SendWebRequest();

        if (request.isNetworkError || request.isHttpError)
        {
            Debug.LogError(string.Format("Error: {0}",request.error));
        }

        else
        {
            // Response can be accessed through: request.downloadHandler.text
            Debug.Log(request.downloadHandler.text);
        }
    }
Comment

PREVIOUS NEXT
Code Example
Csharp :: mailkit send attachment 
Csharp :: c# json to dictionary 
Csharp :: how to move your character in unity 2d game 
Csharp :: c# System.Resources.MissingManifestResourceException error 
Csharp :: get values from range entity framework 
Csharp :: keyboard input unity 
Csharp :: how to append a new line in a txt file c# 
Csharp :: c# count specific element in list 
Csharp :: unity left mouse button 
Csharp :: c# connection string 
Csharp :: string to list c# 
Csharp :: unity conditional field 
Csharp :: c# 8 null coalescing assignment 
Csharp :: discord bot time C# 
Csharp :: change a dropdown to a specific option via script 
Csharp :: C# how to remove an image in a folder 
Csharp :: unity mesh showing Instance 
Csharp :: how to write switch statement unity 
Csharp :: which gas is at anode 
Csharp :: remove first object from list c# 
Csharp :: stop sound in unity 
Csharp :: c# object initialization can be simplified 
Csharp :: C# delete last enviroment new line 
Csharp :: nginx listen on 80 and 443 
Csharp :: object to mouse unity 
Csharp :: get logged in user name c# 
Csharp :: c sharp if string equals 
Csharp :: list of chars to string c# 
Csharp :: loop through all enum values in C# 
Csharp :: how to change textMesh Pro unity 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =