Beamable SDK
Public Member Functions | List of all members
Beamable.Common.Api.IHttpRequester Interface Reference
Inheritance diagram for Beamable.Common.Api.IHttpRequester:
Inheritance graph

Public Member Functions

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...

Member Function Documentation

◆ EscapeURL()

string Beamable.Common.Api.IHttpRequester.EscapeURL ( string  url)

A utility method that will url escape a string.

urla url string
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

methodOne of the common HTTP methods represented through the Method enum
bodyThe 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.
headersA dictionary where the keys are header names, and the values are the header values.
contentTypeA MIME type for the request. For example, "application/json". If the body is serialized to JSON, the contentType will become "application/json" by default.
parserBy 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
TThe 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
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: