public class GXHTTPStreamRequest extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.gcube.common.gxrest.request.GXConnection |
connection |
protected static org.slf4j.Logger |
logger |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all the parameter except the address.
|
GXInboundResponse |
connect()
Sends the CONNECT request to the web application with no body.
|
GXInboundResponse |
connect() |
GXInboundResponse |
delete()
Sends the DELETE request to the web application.
|
GXInboundResponse |
delete()
Sends the DELETE request to the web application.
|
REQUEST |
from(String agent)
Sets the identity user agent associated to the request.
|
GXInboundResponse |
get()
Sends the GET request to the web application.
|
GXInboundResponse |
get()
Sends the GET request to the web application.
|
GXInboundResponse |
head()
Sends the HEAD request to the web application.
|
GXInboundResponse |
head()
Sends the HEAD request to the web application.
|
REQUEST |
header(String name,
String value)
Add headers to the request.
|
void |
isExternalCall(boolean ext)
States if the service being called in an external service (not gCube).
|
void |
isExternalCall(boolean ext) |
static GXHTTPStreamRequest |
newRequest(String address)
Creates a new request.
|
GXInboundResponse |
options()
Sends the OPTIONS request to the web application with no body.
|
GXInboundResponse |
options() |
GXInboundResponse |
patch()
Sends the PATCH request to the web application with no body.
|
GXInboundResponse |
patch() |
REQUEST |
path(String path)
Adds s positional path parameter to the request.
|
GXInboundResponse |
post()
Sends the POST request to the web application with no body.
|
GXInboundResponse |
post() |
GXInboundResponse |
post(InputStream body)
Sends the POST request to the web application.
|
GXInboundResponse |
put()
Sends the PUT request to the web application with no body.
|
GXInboundResponse |
put() |
GXInboundResponse |
put(InputStream body)
Sends the PUT request to the web application.
|
REQUEST |
queryParams(Map<String,String> parameters)
Sets the query parameters for the request.
|
void |
setSecurityToken(String token)
Overrides the default security token.
|
void |
setSecurityToken(String token)
Overrides the default security token.
|
GXInboundResponse |
trace()
Sends the TRACE request to the web application with no body.
|
GXInboundResponse |
trace() |
protected static final org.slf4j.Logger logger
protected org.gcube.common.gxrest.request.GXConnection connection
public static GXHTTPStreamRequest newRequest(String address)
address - the address of the web app to callpublic GXInboundResponse put(InputStream body) throws Exception
body - the body of the requestExceptionpublic GXInboundResponse post(InputStream body) throws Exception
body - the body of the requestExceptionpublic GXInboundResponse put() throws Exception
Exceptionpublic GXInboundResponse delete() throws Exception
Exceptionpublic GXInboundResponse head() throws Exception
Exceptionpublic GXInboundResponse get() throws Exception
Exceptionpublic GXInboundResponse post() throws Exception
Exceptionpublic GXInboundResponse trace() throws Exception
Exceptionpublic GXInboundResponse patch() throws Exception
Exceptionpublic GXInboundResponse options() throws Exception
Exceptionpublic GXInboundResponse connect() throws Exception
Exceptionpublic void setSecurityToken(String token)
token - the new tokenpublic void isExternalCall(boolean ext)
ext - true if external, false otherwisepublic REQUEST from(String agent)
agent - public REQUEST path(String path) throws UnsupportedEncodingException
path - UnsupportedEncodingExceptionpublic REQUEST 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 REQUEST header(String name, String value)
name - value - public GXInboundResponse put() throws Exception
Exceptionpublic GXInboundResponse post() throws Exception
Exceptionpublic GXInboundResponse get() throws Exception
Exceptionpublic GXInboundResponse delete() throws Exception
Exceptionpublic GXInboundResponse head() throws Exception
Exceptionpublic void clear()
public GXInboundResponse trace() throws Exception
Exceptionpublic GXInboundResponse patch() throws Exception
Exceptionpublic GXInboundResponse options() throws Exception
Exceptionpublic GXInboundResponse connect() throws Exception
Exceptionpublic void isExternalCall(boolean ext)
Copyright © 2018. All Rights Reserved.