public class ApacheServiceConnector extends ServiceConnector
| Modifier and Type | Field and Description |
|---|---|
protected static ApacheServiceConnector |
instance |
AUTH_ATTR, CLIENT_ATTR, ENCODING, ORIGIN, ORIGIN_ATTR, tracker, UTF8| Constructor and Description |
|---|
ApacheServiceConnector(String base) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEncodedBodyAttributes(org.apache.http.client.methods.HttpEntityEnclosingRequestBase request,
Map<String,String> attributes) |
void |
close() |
CodotaResponse |
get(GetRequest request) |
CodotaResponse |
getByURI(String uri,
String token) |
static ServiceConnector |
instance() |
CodotaResponse |
post(Request request) |
CodotaResponse |
post(String route,
Map<String,String> attributes,
String token) |
CodotaResponse |
postJson(String route,
String jsonString,
String token) |
CodotaResponse |
put(PutRequest request) |
clear, consumeResponse, encodeAttributes, encodeFullAttributes, getBase, getURIprotected static ApacheServiceConnector instance
public ApacheServiceConnector(String base)
public static ServiceConnector instance()
@Nullable public CodotaResponse getByURI(String uri, @Nullable String token)
@Nullable public CodotaResponse postJson(String route, @NotNull String jsonString, @Nullable String token)
postJson in class ServiceConnectorpublic CodotaResponse put(PutRequest request)
put in class ServiceConnectorpublic CodotaResponse post(Request request)
post in class ServiceConnectorpublic CodotaResponse get(GetRequest request)
get in class ServiceConnectorpublic void addEncodedBodyAttributes(org.apache.http.client.methods.HttpEntityEnclosingRequestBase request,
Map<String,String> attributes)
@Nullable public CodotaResponse post(String route, @NotNull Map<String,String> attributes, @Nullable String token)
post in class ServiceConnectorpublic void close()
Copyright © 2018. All rights reserved.