C# Class IronIO.IronClient

Iron.io client interface
Afficher le fichier Open project: odeits/IronTools Class Usage Examples

Private Properties

Свойство Type Description
BuildHeaders void
ExponentialBackoff bool

Méthodes publiques

Méthode 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

Méthode 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 méthode

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
Résultat string

Get() public méthode

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
Résultat string

IronClient() public méthode

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
Résultat System

Post() public méthode

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
Résultat string

Put() public méthode

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
Résultat string

Request() public méthode

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
Résultat string