public class GXHTTPStringRequest extends Object implements GXHTTP<String,HttpURLConnection>
| Modifier and Type | Field and Description |
|---|---|
protected GXHTTPRequestBuilder |
builder |
protected static org.slf4j.Logger |
logger |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear up the request.
|
HttpURLConnection |
connect() |
HttpURLConnection |
delete() |
GXHTTPStringRequest |
from(String agent) |
HttpURLConnection |
get() |
HttpURLConnection |
head() |
GXHTTPStringRequest |
header(String name,
String value) |
void |
isExternalCall(boolean ext) |
static GXHTTPStringRequest |
newRequest(String address)
Creates a new request.
|
HttpURLConnection |
options() |
HttpURLConnection |
patch() |
GXHTTPStringRequest |
path(String path) |
HttpURLConnection |
post() |
HttpURLConnection |
post(String body)
Sends the POST request to the web application.
|
HttpURLConnection |
put() |
HttpURLConnection |
put(String body)
Sends the PUT request to the web application.
|
GXHTTPStringRequest |
queryParams(Map<String,String> queryParams) |
void |
setSecurityToken(String token) |
HttpURLConnection |
trace() |
GXHTTPStringRequest |
withBody(String body)
Sets the body of the request.
|
protected static final org.slf4j.Logger logger
protected GXHTTPRequestBuilder builder
public static GXHTTPStringRequest newRequest(String address)
address - the address of the web app to callpublic GXHTTPStringRequest withBody(String body)
body - public HttpURLConnection put(String body) throws Exception
GXHTTPput in interface GXHTTP<String,HttpURLConnection>body - the body of the requestExceptionpublic HttpURLConnection post(String body) throws Exception
GXHTTPpost in interface GXHTTP<String,HttpURLConnection>body - the body of the requestExceptionpublic GXHTTPStringRequest from(String agent)
string - public GXHTTPStringRequest path(String path) throws UnsupportedEncodingException
string - UnsupportedEncodingExceptionpublic GXHTTPStringRequest header(String name, String value)
name - value - public GXHTTPStringRequest queryParams(Map<String,String> queryParams) throws UnsupportedEncodingException
queryParams - UnsupportedEncodingExceptionpublic HttpURLConnection put() throws Exception
Exceptionpublic HttpURLConnection delete() throws Exception
Exceptionpublic HttpURLConnection head() throws Exception
Exceptionpublic HttpURLConnection get() throws Exception
Exceptionpublic HttpURLConnection post() throws Exception
Exceptionpublic HttpURLConnection trace() throws Exception
Exceptionpublic HttpURLConnection patch() throws Exception
Exceptionpublic HttpURLConnection options() throws Exception
Exceptionpublic HttpURLConnection connect() throws Exception
Exceptionpublic void setSecurityToken(String token)
public void isExternalCall(boolean ext)
public void clear()
Copyright © 2020. All Rights Reserved.