public class HttpConnector extends Object implements Serializable
| Constructor and Description |
|---|
HttpConnector() |
| Modifier and Type | Method and Description |
|---|---|
static OpenmlApiResponse |
doApiDeleteRequest(URL url,
String ash,
int apiVerboseLevel)
Performs a HTTP delete call
|
static OpenmlApiResponse |
doApiGetRequest(URL url,
String ash,
int apiVerboseLevel)
Performs a HTTP get call
|
static OpenmlApiResponse |
doApiPostRequest(URL url,
org.apache.http.entity.mime.MultipartEntity entity,
String ash,
int apiVerboseLevel)
Performs a HTTP post call
|
protected static File |
getFileFromUrl(URL url,
String filepath,
String extension) |
static File |
getTempFileFromUrl(URL url,
String extension)
Returns a file from the openml server
|
public static OpenmlApiResponse doApiPostRequest(URL url, org.apache.http.entity.mime.MultipartEntity entity, String ash, int apiVerboseLevel) throws Exception
url - - The URL to do the request onentity - - The post variablesash - - api key to authenticateapiVerboseLevel - - for verbosityException - - Can be: server down, problem with URL, etcpublic static OpenmlApiResponse doApiGetRequest(URL url, String ash, int apiVerboseLevel) throws Exception
url - - The URL to do the request onash - - api key to authenticateapiVerboseLevel - - for verbosityException - - Can be: server down, problem with URL, etcpublic static OpenmlApiResponse doApiDeleteRequest(URL url, String ash, int apiVerboseLevel) throws Exception
url - - The URL to do the request onash - - api key to authenticateapiVerboseLevel - - for verbosityException - - Can be: server down, problem with URL, etcpublic static File getTempFileFromUrl(URL url, String extension) throws Exception
url - - The URL to obtainextension - - Extension to give temp fileException - - Can be: server down, problem with URL, etcCopyright © 2019 Leiden University, NL. All rights reserved.