Dissonity
Unity SDK for Discord activities
Loading...
Searching...
No Matches
Dissonity.Api.Proxy Class Reference

Subclass that helps sending HTTPs requests through the Discord proxy. More...

Static Public Member Functions

static Task< TJsonResponse > HttpsPostRequest< TJsonRequest, TJsonResponse > (string path, TJsonRequest payload, Dictionary< string, string >? headers=null)
 Sends an HTTPS post request with a JSON payload to the Discord proxy.

You can pass a relative /cat or absolute https://... path.

⚠️ If you use an absolute path, you'll need to patch the url mappings so the request goes through the proxy.
 
static Task< TJsonResponse > HttpsGetRequest< TJsonResponse > (string path, Dictionary< string, string >? headers=null)
 Sends an HTTPS get request to the Discord proxy.

You can pass a relative /cat or absolute https://... path.

⚠️ If you use an absolute path, you'll need to patch the url mappings so the request goes through the proxy.
 
static Task< TJsonResponse > HttpsPatchRequest< TJsonRequest, TJsonResponse > (string path, TJsonRequest payload, Dictionary< string, string >? headers=null)
 Sends an HTTPS patch request with a JSON payload to the Discord proxy.

You can pass a relative /cat or absolute https://... path.

⚠️ If you use an absolute path, you'll need to patch the url mappings so the request goes through the proxy.
 
static Task< TJsonResponse > HttpsPutRequest< TJsonRequest, TJsonResponse > (string path, TJsonRequest payload, Dictionary< string, string >? headers=null)
 Sends an HTTPS put request with a JSON payload to the Discord proxy.

You can pass a relative /cat or absolute https://... path.

⚠️ If you use an absolute path, you'll need to patch the url mappings so the request goes through the proxy.
 
static Task< TJsonResponse > HttpsDeleteRequest< TJsonRequest, TJsonResponse > (string path, TJsonRequest payload, Dictionary< string, string >? headers=null)
 Sends an HTTPS delete request to the Discord proxy.

You can pass a relative /cat or absolute https://... path.

⚠️ If you use an absolute path, you'll need to patch the url mappings so the request goes through the proxy.
 

Detailed Description

Subclass that helps sending HTTPs requests through the Discord proxy.

Member Function Documentation

◆ HttpsDeleteRequest< TJsonRequest, TJsonResponse >()

static Task< TJsonResponse > Dissonity.Api.Proxy.HttpsDeleteRequest< TJsonRequest, TJsonResponse > ( string path,
TJsonRequest payload,
Dictionary< string, string >? headers = null )
inlinestatic

Sends an HTTPS delete request to the Discord proxy.

You can pass a relative /cat or absolute https://... path.

⚠️ If you use an absolute path, you'll need to patch the url mappings so the request goes through the proxy.

Exceptions
InvalidOperationException
WebException
JsonException

◆ HttpsGetRequest< TJsonResponse >()

static Task< TJsonResponse > Dissonity.Api.Proxy.HttpsGetRequest< TJsonResponse > ( string path,
Dictionary< string, string >? headers = null )
inlinestatic

Sends an HTTPS get request to the Discord proxy.

You can pass a relative /cat or absolute https://... path.

⚠️ If you use an absolute path, you'll need to patch the url mappings so the request goes through the proxy.

Exceptions
InvalidOperationException
WebException
JsonException

◆ HttpsPatchRequest< TJsonRequest, TJsonResponse >()

static Task< TJsonResponse > Dissonity.Api.Proxy.HttpsPatchRequest< TJsonRequest, TJsonResponse > ( string path,
TJsonRequest payload,
Dictionary< string, string >? headers = null )
inlinestatic

Sends an HTTPS patch request with a JSON payload to the Discord proxy.

You can pass a relative /cat or absolute https://... path.

⚠️ If you use an absolute path, you'll need to patch the url mappings so the request goes through the proxy.

Exceptions
InvalidOperationException
WebException
JsonException

◆ HttpsPostRequest< TJsonRequest, TJsonResponse >()

static Task< TJsonResponse > Dissonity.Api.Proxy.HttpsPostRequest< TJsonRequest, TJsonResponse > ( string path,
TJsonRequest payload,
Dictionary< string, string >? headers = null )
inlinestatic

Sends an HTTPS post request with a JSON payload to the Discord proxy.

You can pass a relative /cat or absolute https://... path.

⚠️ If you use an absolute path, you'll need to patch the url mappings so the request goes through the proxy.

Exceptions
InvalidOperationException
WebException
JsonException

◆ HttpsPutRequest< TJsonRequest, TJsonResponse >()

static Task< TJsonResponse > Dissonity.Api.Proxy.HttpsPutRequest< TJsonRequest, TJsonResponse > ( string path,
TJsonRequest payload,
Dictionary< string, string >? headers = null )
inlinestatic

Sends an HTTPS put request with a JSON payload to the Discord proxy.

You can pass a relative /cat or absolute https://... path.

⚠️ If you use an absolute path, you'll need to patch the url mappings so the request goes through the proxy.

Exceptions
InvalidOperationException
WebException
JsonException

The documentation for this class was generated from the following file: