|
Promise< T > | ManualRequest< T > (Method method, string url, object body=null, Dictionary< string, string > headers=null, string contentType="application/json", Func< string, T > parser=null) |
| Make an HTTP request to any address with no preconfigured authorization More...
|
|
string | EscapeURL (string url) |
| A utility method that will url escape a string. More...
|
|
◆ EscapeURL()
string Beamable.Common.Api.IHttpRequester.EscapeURL |
( |
string |
url | ) |
|
A utility method that will url escape a string.
- Parameters
-
- Returns
- the given url string, but with character escaping.
Implemented in Beamable.Api.PlatformRequester.
◆ ManualRequest< T >()
Promise< T > Beamable.Common.Api.IHttpRequester.ManualRequest< T > |
( |
Method |
method, |
|
|
string |
url, |
|
|
object |
body = null , |
|
|
Dictionary< string, string > |
headers = null , |
|
|
string |
contentType = "application/json" , |
|
|
Func< string, T > |
parser = null |
|
) |
| |
Make an HTTP request to any address with no preconfigured authorization
- Parameters
-
method | One of the common HTTP methods represented through the Method enum |
url | |
body | The body of the network request. If the type of the body is an object, it will be serialized to JSON. If the type of the body is a string, no serialization will occur. |
headers | A dictionary where the keys are header names, and the values are the header values. |
contentType | A MIME type for the request. For example, "application/json". If the body is serialized to JSON, the contentType will become "application/json" by default. |
parser | By default, the network response will be assumed JSON and deserialized as such. However, if a parser is provided, the network response will be given the parser as a string. The parser can convert the string into the expected result type, T |
- Template Parameters
-
T | The type of the network response. The network response will be deserialized into an instance of T. You can override the parsing by passing a custom parser |
- Returns
- A Promise<T> of type T when the network request completes.
Implemented in Beamable.Api.PlatformRequester.
The documentation for this interface was generated from the following file:
- com.beamable/Common/Runtime/Api/IBeamableRequester.cs