@Deprecated public class V1APIConnector extends Object implements IAPIConnector
| Modifier and Type | Field and Description |
|---|---|
Map<String,String> |
customHttpHeaders
Deprecated.
|
| Constructor and Description |
|---|
V1APIConnector(String url)
Deprecated.
Create a connection with only the URL to the VersionOne server.
|
V1APIConnector(String url,
ProxyProvider proxy)
Deprecated.
Create a connection with only the URL to the VersionOne server through a proxy.
|
V1APIConnector(String url,
String userName,
String password)
Deprecated.
Create a connection using a username and password.
|
V1APIConnector(String url,
String userName,
String password,
ProxyProvider proxy)
Deprecated.
Create a connection using username and password through a proxy.
|
| Modifier and Type | Method and Description |
|---|---|
OutputStream |
beginRequest(String path,
String contentType)
Deprecated.
Beginning HTTP POST request to the server.
|
InputStream |
endRequest(String path)
Deprecated.
Complete the HTTP request and get a response.
|
InputStream |
getAttachment(String attachmentKey)
Deprecated.
Read data from the path provided
Note: Caller is responsible for closing the returned stream
|
ICookiesManager |
getCookiesJar()
Deprecated.
Returns a cookies jar.
|
Reader |
getData()
Deprecated.
Read data from the root of the connection.
|
Reader |
getData(String path)
Deprecated.
Read data from the path provided.
|
String |
getUserAgentHeader()
Deprecated.
Get the value for the user-agent header.
|
Reader |
sendData(String path,
String data)
Deprecated.
Send data to the path.
|
void |
setUserAgentHeader(String name,
String version)
Deprecated.
Set a value for custom the user-agent header.
|
public V1APIConnector(String url)
url - URL of the VersionOne serverpublic V1APIConnector(String url, ProxyProvider proxy)
url - URL to the VersionOne serverproxy - Proxy for the connectionpublic V1APIConnector(String url, String userName, String password)
url - URL of the VersionOne serveruserName - VersionOne usernamepassword - VersionOne passwordpublic V1APIConnector(String url, String userName, String password, ProxyProvider proxy)
url - URL of the VersionOne serveruserName - VersionOne usernamepassword - VersionOne passwordproxy - Proxy for the connectionpublic void setUserAgentHeader(String name, String version)
name - Stringversion - Stringpublic String getUserAgentHeader()
public ICookiesManager getCookiesJar()
public Reader getData() throws ConnectionException
getData in interface IAPIConnectorConnectionException - - ConnectionExceptionpublic Reader getData(String path) throws ConnectionException
getData in interface IAPIConnectorpath - - StringConnectionException - - ConnectionExceptionpublic InputStream getAttachment(String attachmentKey) throws ConnectionException
IAPIConnectorgetAttachment in interface IAPIConnectorConnectionExceptionpublic Reader sendData(String path, String data) throws ConnectionException
sendData in interface IAPIConnectorpath - Stringdata - StringConnectionException - - ConnectionExceptionpublic OutputStream beginRequest(String path, String contentType) throws ConnectionException
endRequest(String) method with the same path
parameter.beginRequest in interface IAPIConnectorpath - Path to the data on server.contentType - Content-type of output content. If null - GET request used.ConnectionException - if any connection problems occurendRequest(String)public InputStream endRequest(String path) throws ConnectionException
endRequest in interface IAPIConnectorpath - Path to the data on server.ConnectionException - if any connection problems occurbeginRequest(String, String)Copyright © 2016 VersionOne, Inc.. All rights reserved.