public class GXHTTPRequestBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
GXConnection |
connection |
protected static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
GXHTTPRequestBuilder() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all the parameter except the address.
|
HttpURLConnection |
connect() |
HttpURLConnection |
delete()
Sends the DELETE request to the web application.
|
GXHTTPRequestBuilder |
from(String agent)
Sets the identity user agent associated to the request.
|
HttpURLConnection |
get()
Sends the GET request to the web application.
|
HttpURLConnection |
head()
Sends the HEAD request to the web application.
|
GXHTTPRequestBuilder |
header(String name,
String value)
Add headers to the request.
|
void |
isExternalCall(boolean ext) |
HttpURLConnection |
options() |
HttpURLConnection |
patch() |
GXHTTPRequestBuilder |
path(String path)
Adds s positional path parameter to the request.
|
HttpURLConnection |
post() |
HttpURLConnection |
put() |
GXHTTPRequestBuilder |
queryParams(Map<String,String> parameters)
Sets the query parameters for the request.
|
void |
setSecurityToken(String token)
Overrides the default security token.
|
HttpURLConnection |
trace() |
protected static final org.slf4j.Logger logger
public GXConnection connection
public GXHTTPRequestBuilder from(String agent)
agent - public GXHTTPRequestBuilder path(String path) throws UnsupportedEncodingException
path - UnsupportedEncodingExceptionpublic GXHTTPRequestBuilder queryParams(Map<String,String> parameters) throws UnsupportedEncodingException
parameters - the parameters that go in the URL after the address and the
path params.UnsupportedEncodingExceptionpublic void setSecurityToken(String token)
token - public GXHTTPRequestBuilder header(String name, String value)
name - value - public HttpURLConnection put() throws Exception
Exceptionpublic HttpURLConnection post() throws Exception
Exceptionpublic HttpURLConnection get() throws Exception
Exceptionpublic HttpURLConnection delete() throws Exception
Exceptionpublic HttpURLConnection head() throws Exception
Exceptionpublic void clear()
public HttpURLConnection trace() throws Exception
Exceptionpublic HttpURLConnection patch() throws Exception
Exceptionpublic HttpURLConnection options() throws Exception
Exceptionpublic HttpURLConnection connect() throws Exception
Exceptionpublic void isExternalCall(boolean ext)
Copyright © 2020. All Rights Reserved.