public class GXConnection extends Object
GXHTTPStringRequest.| Modifier and Type | Class and Description |
|---|---|
static class |
GXConnection.HTTPMETHOD |
| Modifier and Type | Field and Description |
|---|---|
protected String |
address |
protected String |
agent |
static String |
APPLICATION_JSON_CHARSET_UTF_8 |
protected static org.slf4j.Logger |
logger |
static String |
PARAM_EQUALS |
static String |
PARAM_SEPARATOR |
static String |
PARAM_STARTER |
protected String |
path |
static String |
PATH_SEPARATOR |
static String |
UTF8 |
| Constructor and Description |
|---|
GXConnection(String address) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBody(String body)
The body of the request.
|
void |
addBodyAsStream(InputStream bodyAsStream) |
protected void |
addPath(String pathPart) |
boolean |
isExtCall() |
void |
reset()
Resets the connection.
|
HttpURLConnection |
send(GXConnection.HTTPMETHOD method)
Sends the request with the given method
|
protected void |
setAgent(String agent) |
void |
setExtCall(boolean extCall) |
void |
setPathParameters(String parameters)
Sets the path parameters for the connection.
|
void |
setProperty(String name,
String value)
Adds a property as header.
|
void |
setQueryParameters(String parameters)
Sets the query parameters for the connection.
|
public static final String APPLICATION_JSON_CHARSET_UTF_8
public static final String PATH_SEPARATOR
public static final String PARAM_STARTER
public static final String PARAM_EQUALS
public static final String PARAM_SEPARATOR
public static final String UTF8
protected static final org.slf4j.Logger logger
protected final String address
protected String path
protected String agent
public GXConnection(String address)
protected void addPath(String pathPart) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic HttpURLConnection send(GXConnection.HTTPMETHOD method) throws Exception
method - Exceptionprotected void setAgent(String agent)
agent - public void setPathParameters(String parameters)
parameters - public void setQueryParameters(String parameters)
parameters - public void reset()
public void addBody(String body)
body - public void addBodyAsStream(InputStream bodyAsStream)
bodyAsStream - the stream to set as inputpublic void setProperty(String name, String value)
name - value - public void setExtCall(boolean extCall)
extCall - the extCall to setpublic boolean isExtCall()
Copyright © 2020. All Rights Reserved.