Multiplayer Reference
Class Web
Namespace: PlayerIO.GameLibrary
Language: C# / .NET
An easy way to communicate with servers and services outside Player.IO via http requests
Only paid Player.IO accounts can call these methods on the live servers, due to security concerns. They are always avaliable on the local development server however.
You can fully develop your game locally using these methods without restrictions, and only upgrade to a paid account when you need to deploy your game to the live servers
Below is an example of using the Get() method to download the contents of a web page in the GameStarted() method of a multiplayer room.
Methods | |||
---|---|---|---|
public void |
Perform a HTTP Get request. |
||
public void |
Perform a HTTP Get request. |
||
public void |
Perform a HTTP Get request. |
||
public void |
Perform a HTTP Get request. |
||
public void |
Perform a HTTP Post request. |
||
public void |
Perform a HTTP Post request. |
||
public void |
Perform a HTTP Post request. |
||
public void |
Perform a HTTP Post request. |
Web.Get
public void |
|
Perform a HTTP Get request.
Arguments
string | url |
The url to request, including querystring arguments (if any) | |
Dictionary<string, string> | headers |
A collection of headers to set on the request (if any) | |
Callback<HttpResponse> | successCallback |
Callback with a stream of the returned page |
Web.Get
public void |
|
Perform a HTTP Get request.
Arguments
string | url |
The url to request, including querystring arguments (if any) | |
Dictionary<string, string> | headers |
A collection of headers to set on the request (if any) | |
Callback<HttpResponse> | successCallback |
Callback with a stream of the returned page | |
Callback<PlayerIOError> | errorCallback |
Callback that will be called instead of successCallback if an error occurs during the request. |
Web.Get
public void |
|
Perform a HTTP Get request.
Arguments
string | url |
The url to request, including querystring arguments (if any) | |
Callback<HttpResponse> | successCallback |
Callback with a stream of the returned page |
Web.Get
public void |
|
Perform a HTTP Get request.
Arguments
string | url |
The url to request, including querystring arguments (if any) | |
Callback<HttpResponse> | successCallback |
Callback with a stream of the returned page | |
Callback<PlayerIOError> | errorCallback |
Callback that will be called instead of successCallback if an error occurs during the request. |
Web.Post
public void |
|
Perform a HTTP Post request.
Arguments
string | url |
The url to request, including querystring arguments (if any) | |
Dictionary<string, string> | post |
The values to post to the given url | |
Dictionary<string, string> | headers |
A collection of headers to set on the request (if any) | |
Callback<HttpResponse> | successCallback |
Callback with a stream of the returned page |
Web.Post
public void |
|
Perform a HTTP Post request.
Arguments
string | url |
The url to request, including querystring arguments (if any) | |
Dictionary<string, string> | post |
The values to post to the given url | |
Dictionary<string, string> | headers |
A collection of headers to set on the request (if any) | |
Callback<HttpResponse> | successCallback |
Callback with a stream of the returned page | |
Callback<PlayerIOError> | errorCallback |
Callback that will be called instead of successCallback if an error occurs during the request. |
Web.Post
public void |
|
Perform a HTTP Post request.
Arguments
string | url |
The url to request, including querystring arguments (if any) | |
Dictionary<string, string> | post |
The values to post to the given url | |
Callback<HttpResponse> | successCallback |
Callback with a stream of the returned page |
Web.Post
public void |
|
Perform a HTTP Post request.
Arguments
string | url |
The url to request, including querystring arguments (if any) | |
Dictionary<string, string> | post |
The values to post to the given url | |
Callback<HttpResponse> | successCallback |
Callback with a stream of the returned page | |
Callback<PlayerIOError> | errorCallback |
Callback that will be called instead of successCallback if an error occurs during the request. |