Class RestConnector
- java.lang.Object
-
- pt.rcaap.cienciavitae.curriculum.client.RestConnector
-
public class RestConnector extends Object
API Connector- Author:
- pgraca
-
-
Constructor Summary
Constructors Constructor Description RestConnector(String baseUrl, String userName, String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamget(String path)Perform a GET requestStringgetBasePath()InputStreampost(String path, List<org.apache.http.NameValuePair> data)Perform a POST request
-
-
-
Method Detail
-
get
public InputStream get(String path) throws ConnectorException
Perform a GET request- Parameters:
path- with query string- Returns:
- an InputStream with a Result
- Throws:
ConnectorException
-
post
public InputStream post(String path, List<org.apache.http.NameValuePair> data) throws ConnectorException
Perform a POST request- Parameters:
path- with query stringdata- to send- Returns:
- an InputStream with a Result
- Throws:
ConnectorException
-
getBasePath
public String getBasePath()
-
-