C# Class UnityTools.IO.UnityAgentRequest

Show file Open project: NoxHarmonium/unity-tools

Protected Properties

Property Type Description
_data UnityAgentDataType
_queryVars string>.Dictionary
_webRequest System.Net.HttpWebRequest

Public Methods

Method Description
Begin ( ) : UnityTask
Query ( string>.Dictionary queryVars ) : UnityAgentRequest

Sets all the query string pairs of this request.

Query ( string key, string value ) : UnityAgentRequest

Sets the value of a query string in this request.

Send ( JsonData data ) : UnityAgentRequest

Sets the body data of the request as a JSON object. This method assumes the use of the application/x-www-form-urlencoded data type (UnityAgentFormDataType) and will append the data each time this method is called seperated by an ampersand. To set a custom data type use the other overloads.

Send ( UnityAgentDataType data ) : UnityAgentRequest

Sets the data of a request. This is a low level method. You would usually one of the other overloads of this method to send text or JSON data.

Send ( string data ) : UnityAgentRequest

Sets the body data of the request as a string. This method assumes the use of the application/x-www-form-urlencoded data type (UnityAgentFormDataType) and will append the data each time this method is called seperated by an ampersand. To set a custom data type use the other overloads.

Set ( string>.Dictionary headers ) : UnityAgentRequest

Sets all the headers of this request.

Set ( string key, string value ) : UnityAgentRequest

Sets the value of a header in this request. Returns this UnityAgentRequest object so that calls can be chained.

UnityAgentRequest ( string verb, string url ) : System

Method Details

Begin() public method

public Begin ( ) : UnityTask
return UnityTask

Query() public method

Sets all the query string pairs of this request.
public Query ( string>.Dictionary queryVars ) : UnityAgentRequest
queryVars string>.Dictionary
return UnityAgentRequest

Query() public method

Sets the value of a query string in this request.
public Query ( string key, string value ) : UnityAgentRequest
key string The key of the query string pair..
value string The value of the query string pair.
return UnityAgentRequest

Send() public method

Sets the body data of the request as a JSON object. This method assumes the use of the application/x-www-form-urlencoded data type (UnityAgentFormDataType) and will append the data each time this method is called seperated by an ampersand. To set a custom data type use the other overloads.
public Send ( JsonData data ) : UnityAgentRequest
data LitJson.JsonData The body data of the request.
return UnityAgentRequest

Send() public method

Sets the data of a request. This is a low level method. You would usually one of the other overloads of this method to send text or JSON data.
public Send ( UnityAgentDataType data ) : UnityAgentRequest
data UnityAgentDataType
return UnityAgentRequest

Send() public method

Sets the body data of the request as a string. This method assumes the use of the application/x-www-form-urlencoded data type (UnityAgentFormDataType) and will append the data each time this method is called seperated by an ampersand. To set a custom data type use the other overloads.
public Send ( string data ) : UnityAgentRequest
data string The body data of the request.
return UnityAgentRequest

Set() public method

Sets all the headers of this request.
public Set ( string>.Dictionary headers ) : UnityAgentRequest
headers string>.Dictionary
return UnityAgentRequest

Set() public method

Sets the value of a header in this request. Returns this UnityAgentRequest object so that calls can be chained.
public Set ( string key, string value ) : UnityAgentRequest
key string The name of the header (the key).
value string The value of the header
return UnityAgentRequest

UnityAgentRequest() public method

public UnityAgentRequest ( string verb, string url ) : System
verb string
url string
return System

Property Details

_data protected property

protected UnityAgentDataType,UnityTools.IO _data
return UnityAgentDataType

_queryVars protected property

protected Dictionary _queryVars
return string>.Dictionary

_webRequest protected property

protected HttpWebRequest,System.Net _webRequest
return System.Net.HttpWebRequest