C# Class IronIO.IronClient

Iron.io client interface
Mostra file Open project: odeits/IronTools Class Usage Examples

Private Properties

Property Type Description
BuildHeaders void
ExponentialBackoff bool

Public Methods

Method Description
Delete ( string url, NameValueCollection headers = null, bool retry = true ) : string

Issues a DELETE request

Get ( string url, NameValueCollection headers = null, bool retry = true ) : string

Issues a GET request

IronClient ( string name, string version, string product, string host = null, int port, string projectId = null, string token = null, string protocol = null, int apiVersion, string configFile = null ) : System

Initializes a new instance of the IronClient class.

Post ( string url, string body = "", NameValueCollection headers = null, bool retry = true ) : string

Issues a POST request

Put ( string url, string body = "", NameValueCollection headers = null, bool retry = true ) : string

Issues a PUT request

Request ( string url, string method, string body = null, NameValueCollection headers = null, bool retry = true ) : string

Issues a generic request

Private Methods

Method Description
BuildHeaders ( ) : void

Internal utility function to build headers

ExponentialBackoff ( Random rng, int tries ) : bool

Implements exponential back off source: http://aws.amazon.com/articles/1394

Method Details

Delete() public method

Issues a DELETE request
public Delete ( string url, NameValueCollection headers = null, bool retry = true ) : string
url string Url to issues the request to
headers System.Collections.Specialized.NameValueCollection Additional header information
retry bool Retry if unsuccessful
return string

Get() public method

Issues a GET request
public Get ( string url, NameValueCollection headers = null, bool retry = true ) : string
url string Url to issues the request to
headers System.Collections.Specialized.NameValueCollection Additional header information
retry bool Retry if unsuccessful
return string

IronClient() public method

Initializes a new instance of the IronClient class.
public IronClient ( string name, string version, string product, string host = null, int port, string projectId = null, string token = null, string protocol = null, int apiVersion, string configFile = null ) : System
name string Client name
version string Version of the client
product string Iron.io product
host string hostname to use
port int port number
projectId string Project identifier available from the HUD
token string Token available from the HUD
protocol string Protocol e.g. http https
apiVersion int Version of the API to use (1,2)
configFile string Path to a specific JSON configuration file to load
return System

Post() public method

Issues a POST request
public Post ( string url, string body = "", NameValueCollection headers = null, bool retry = true ) : string
url string Url to issues the request to
body string Data to send
headers System.Collections.Specialized.NameValueCollection Additional header information
retry bool Retry if unsuccessful
return string

Put() public method

Issues a PUT request
public Put ( string url, string body = "", NameValueCollection headers = null, bool retry = true ) : string
url string Url to issues the request to
body string Data to send
headers System.Collections.Specialized.NameValueCollection Additional header information
retry bool Retry if unsuccessful
return string

Request() public method

Issues a generic request
public Request ( string url, string method, string body = null, NameValueCollection headers = null, bool retry = true ) : string
url string Url to issues the request to
method string Http METHOD to use
body string Data to send
headers System.Collections.Specialized.NameValueCollection Additional header information
retry bool Retry if unsuccessful
return string