class Http

in global :: Sandbox

Lets your game make async HTTP requests.


public static bool IsAllowed( Uri uri )

Check if the given Uri matches the following requirements: 1. Scheme is https/http or wss/ws 2. If it's localhost, only allow ports 80/443/8080/8443 3. Not an ip address

  • uri The Uri to check.
  • Returns True if the Uri can be accessed, false if the Uri will be blocked.

public static bool IsHeaderAllowed( string header )

Checks if a given header is allowed to be set.

  • header The header name to check.
  • Returns True if the header is allowed to be set.

public static Task<string> RequestStringAsync( string requestUri, string method = GET, HttpContent content = null, Dictionary<string,string> headers = null, CancellationToken cancellationToken = null )

😔 No documentation found.

public static Task<byte[]> RequestBytesAsync( string requestUri, string method = GET, HttpContent content = null, Dictionary<string,string> headers = null, CancellationToken cancellationToken = null )

😔 No documentation found.

public static Task<Stream> RequestStreamAsync( string requestUri, string method = GET, HttpContent content = null, Dictionary<string,string> headers = null, CancellationToken cancellationToken = null )

😔 No documentation found.

public static Task<T> RequestJsonAsync( string requestUri, string method = GET, HttpContent content = null, Dictionary<string,string> headers = null, CancellationToken cancellationToken = null )

😔 No documentation found.

public static Task<HttpResponseMessage> RequestAsync( string requestUri, string method = GET, HttpContent content = null, Dictionary<string,string> headers = null, CancellationToken cancellationToken = null )

😔 No documentation found.

public static HttpContent CreateJsonContent( T target )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.