public abstract class AlchemyService extends WatsonService
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ENDPOINT
The Alchemy endpoint.
|
protected static String |
JSONP
The Constant JSONP.
|
protected static String |
OUTPUT_MODE
The Constant OUTPUT_MODE.
|
FORWARD_SLASH| Constructor and Description |
|---|
AlchemyService()
Instantiates a new alchemy service.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.http.HttpResponse |
execute(org.apache.http.client.methods.HttpRequestBase request)
Execute the Http request.
|
protected String |
getInputFormat(Map<String,Object> params,
String... acceptedFormats)
Returns the first non-null accepted format from the parameter map.
|
protected void |
setAuthentication(org.apache.http.client.methods.HttpRequestBase request)
Sets the authentication.
|
executeRequest, executeWithoutResponse, getApiKey, getDefaultContentType, getDefaultRequestParams, getEndPoint, getHttpClient, getThreadSafeClient, setApiKey, setEndPoint, setUsernameAndPassword, toStringprotected static final String ENDPOINT
protected static final String OUTPUT_MODE
protected static final String JSONP
protected void setAuthentication(org.apache.http.client.methods.HttpRequestBase request)
WatsonServicesetAuthentication in class WatsonServicerequest - the new authenticationprotected String getInputFormat(Map<String,Object> params, String... acceptedFormats)
params - the request parametersacceptedFormats - the accepted formatsprotected org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpRequestBase request)
WatsonServiceexecute in class WatsonServicerequest - the http requestCopyright © 2015. All rights reserved.