public class GXHTTPStreamRequest extends Object implements GXHTTP<InputStream,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() |
GXHTTPStreamRequest |
from(String agent) |
HttpURLConnection |
get() |
HttpURLConnection |
head() |
GXHTTPStreamRequest |
header(String name,
String value) |
void |
isExternalCall(boolean ext) |
static GXHTTPStreamRequest |
newRequest(String address)
Creates a new request.
|
HttpURLConnection |
options() |
HttpURLConnection |
patch() |
GXHTTPStreamRequest |
path(String path) |
HttpURLConnection |
post() |
HttpURLConnection |
post(InputStream body)
Sends the POST request to the web application.
|
HttpURLConnection |
put() |
HttpURLConnection |
put(InputStream body)
Sends the PUT request to the web application.
|
GXHTTPStreamRequest |
queryParams(Map<String,String> queryParams) |
void |
setSecurityToken(String token) |
HttpURLConnection |
trace() |
protected static final org.slf4j.Logger logger
protected GXHTTPRequestBuilder builder
public static GXHTTPStreamRequest newRequest(String address)
address - the address of the web app to callpublic HttpURLConnection put(InputStream body) throws Exception
GXHTTPput in interface GXHTTP<InputStream,HttpURLConnection>body - the body of the requestExceptionpublic HttpURLConnection post(InputStream body) throws Exception
GXHTTPpost in interface GXHTTP<InputStream,HttpURLConnection>body - the body of the requestExceptionpublic GXHTTPStreamRequest from(String agent)
string - public GXHTTPStreamRequest path(String path) throws UnsupportedEncodingException
path - UnsupportedEncodingExceptionpublic GXHTTPStreamRequest header(String name, String value)
name - value - public GXHTTPStreamRequest 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.