Watson Developer Cloud Unity SDK  1.0.0
The Unity SDK uses the Watson Developer Cloud services, a collection of REST APIs and SDKs that use cognitive computing to solve complex problems.
IBM.Watson.DeveloperCloud.Connection.RESTConnector Class Reference

REST connector class. More...

Classes

class  Form
 Multi-part form data class. More...
 
class  Request
 This class is created to make a request to send to the server. More...
 
class  Response
 The class is returned by a Request object containing the response to a request made by the client. More...
 

Public Member Functions

delegate void ResponseEvent (Request req, Response resp)
 This delegate type is declared for a Response handler function. More...
 
delegate void ProgressEvent (float progress)
 This delegate is invoked to provide download progress. More...
 
bool Send (Request request)
 Send a request to the server. The request contains a callback that is invoked when a response is received. The request may be queued if multiple requests are made at once. More...
 

Static Public Member Functions

static RESTConnector GetConnector (Credentials credentials, string function)
 This function returns a RESTConnector object for the given service and function. More...
 

Public Attributes

const string AUTHENTICATION_TOKEN_AUTHORIZATION_HEADER = "X-Watson-Authorization-Token"
 
const string AUTHENTICATION_AUTHORIZATION_HEADER = "Authorization"
 

Properties

static float LogResponseTime [get, set]
 Specify a time to log to the logging system when a response takes longer than this amount. More...
 
string URL [get, set]
 Base URL for REST requests. More...
 
Credentials Authentication [get, set]
 Credentials used to authenticate with the server. More...
 
Dictionary< string, string > Headers [get, set]
 Additional headers to attach to all requests. More...
 

Detailed Description

REST connector class.

Member Function Documentation

static RESTConnector IBM.Watson.DeveloperCloud.Connection.RESTConnector.GetConnector ( Credentials  credentials,
string  function 
)
inlinestatic

This function returns a RESTConnector object for the given service and function.

Parameters
serviceIDThe ID of the service.
functionThe name of the function.
Returns
Returns a RESTConnector object or null on error.
delegate void IBM.Watson.DeveloperCloud.Connection.RESTConnector.ProgressEvent ( float  progress)

This delegate is invoked to provide download progress.

Parameters
progress
delegate void IBM.Watson.DeveloperCloud.Connection.RESTConnector.ResponseEvent ( Request  req,
Response  resp 
)

This delegate type is declared for a Response handler function.

Parameters
reqThe original request object.
respThe response object.
bool IBM.Watson.DeveloperCloud.Connection.RESTConnector.Send ( Request  request)
inline

Send a request to the server. The request contains a callback that is invoked when a response is received. The request may be queued if multiple requests are made at once.

Parameters
requestThe request object.
Returns
true is returned on success, false is returned if the Request can't be sent.

Member Data Documentation

const string IBM.Watson.DeveloperCloud.Connection.RESTConnector.AUTHENTICATION_AUTHORIZATION_HEADER = "Authorization"
const string IBM.Watson.DeveloperCloud.Connection.RESTConnector.AUTHENTICATION_TOKEN_AUTHORIZATION_HEADER = "X-Watson-Authorization-Token"

Property Documentation

Credentials IBM.Watson.DeveloperCloud.Connection.RESTConnector.Authentication
getset

Credentials used to authenticate with the server.

Dictionary<string, string> IBM.Watson.DeveloperCloud.Connection.RESTConnector.Headers
getset

Additional headers to attach to all requests.

float IBM.Watson.DeveloperCloud.Connection.RESTConnector.LogResponseTime
staticgetset

Specify a time to log to the logging system when a response takes longer than this amount.

string IBM.Watson.DeveloperCloud.Connection.RESTConnector.URL
getset

Base URL for REST requests.


The documentation for this class was generated from the following file: