Interface HttpClient
A simple blocking Http Client using UnityWebRequest.
Namespace: Utils
Syntax
public interface HttpClient
Methods
ProcessHttpGetBlocking(String, String)
A get request that can optionally take an authorization token to be wrapped as Bearer auth.
Declaration
string ProcessHttpGetBlocking(string url, [CanBeNull] string authorization = null)
Parameters
Type | Name | Description |
---|---|---|
String | url | |
String | authorization |
Returns
Type | Description |
---|---|
String | Resulting string from download handler. Throws exception only in batch mode. |
ProcessHttpPostBlocking(String, UploadHandler, String)
A Post request that can optionally take an authorization token to be wrapped as Bearer auth.
Declaration
string ProcessHttpPostBlocking(string url, UploadHandler uh, [CanBeNull] string authorization = null)
Parameters
Type | Name | Description |
---|---|---|
String | url | |
UploadHandler | uh | |
String | authorization |
Returns
Type | Description |
---|---|
String | Resulting string from download handler. Throws exception only in batch mode. |
ProcessHttpPutBlocking(String, UploadHandler, String)
A Put request that can optionally take an authorization token to be wrapped as Bearer auth.
Declaration
string ProcessHttpPutBlocking(string url, UploadHandler uh, [CanBeNull] string authorization = null)
Parameters
Type | Name | Description |
---|---|---|
String | url | |
UploadHandler | uh | |
String | authorization |
Returns
Type | Description |
---|---|
String | Resulting string from download handler. Throws exception only in batch mode. |