RESTClient
public class RESTClient
Constructor Summary | |
---|---|
void | __construct(str host, int port, str path, str version, str username, str password, str auth, mixed logger) |
Method Summary | |
---|---|
void | setHost(string host) Set the host. |
void | setPort(string port) Set the port. |
void | setPath(string path) Set the path. |
void | setVersion(string version) Set the version. |
void | setUsername(string username) Set the username. |
void | setPassword(string password) Set the password. |
void | setAuth(string auth) Set the authentication scheme. |
void | setPrefix(string prefix) Set the URL prefix. |
string | Get the URL prefix. |
void | setLogger(LoggerInterface logger) Set the logger. |
LoggerInterface | Get the logger. |
void | send(RESTRequest request) Send a REST request. |
protected void | setOptions(resource ch, string url, mixed urlStr, mixed headers) Set cURL options common to all requests |
void | get(RESTRequest request) Perform a GET request with cURL |
void | put(RESTRequest request) Perform a PUT request with cURL |
void | delete(RESTRequest request) Perform a DELETE request with cURL |
void | post(RESTRequest request) Perform a POST request with cURL |
void | head(RESTRequest request) Perform a HEAD request with cURL |
void | execute(resource ch) Execute a cURL request. |
void | installExtension($resource URL, $params resource, $filename file, mixed params, mixed filename) Install a REST API XQuery extension |
public void __construct(str host, int port, str path, str version, str username, str password, str auth, mixed logger)
public void setHost(string host)
Set the host.
public void setPort(string port)
Set the port.
public void setPath(string path)
Set the path.
public void setVersion(string version)
Set the version.
public void setUsername(string username)
Set the username.
public void setPassword(string password)
Set the password.
public void setAuth(string auth)
Set the authentication scheme.
public void setPrefix(string prefix)
Set the URL prefix. Allows you to create a custom URL when no arguments are passed at construction.
public string getPrefix()
Get the URL prefix.
public void setLogger(LoggerInterface logger)
Set the logger.
public LoggerInterface getLogger()
Get the logger.
public void send(RESTRequest request)
Send a REST request.
protected void setOptions(resource ch, string url, mixed urlStr, mixed headers)
Set cURL options common to all requests
public void get(RESTRequest request)
Perform a GET request with cURL
public void put(RESTRequest request)
Perform a PUT request with cURL
public void delete(RESTRequest request)
Perform a DELETE request with cURL
public void post(RESTRequest request)
Perform a POST request with cURL
public void head(RESTRequest request)
Perform a HEAD request with cURL
public void execute(resource ch)
Execute a cURL request.
public void installExtension($resource URL, $params resource, $filename file, mixed params, mixed filename)
Install a REST API XQuery extension
Represents a REST client.