public class GXHTTPRequest extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all the parameter except the address.
|
GXInboundResponse |
delete()
Sends the DELETE request to the web application.
|
GXHTTPRequest |
from(String agent)
Sets the identity user agent associated to the request.
|
GXInboundResponse |
get()
Sends the GET request to the web application.
|
GXInboundResponse |
head()
Sends the HEAD request to the web application.
|
static GXHTTPRequest |
newRequest(String address)
Creates a new request.
|
GXHTTPRequest |
path(String path)
Adds s positional path parameter to the request.
|
GXInboundResponse |
post(String body)
Sends the POST request to the web application.
|
GXInboundResponse |
put(String body)
Sends the PUT request to the web application.
|
GXHTTPRequest |
queryParams(Map<String,String> parameters)
Sets the query parameters for the request.
|
void |
setSecurityToken(String token)
Overrides the default security token.
|
GXHTTPRequest |
withBody(String body)
Sets the body of the request.
|
public static GXHTTPRequest newRequest(String address)
address - the address of the web app to callpublic GXHTTPRequest from(String agent)
agent - public GXHTTPRequest path(String path) throws UnsupportedEncodingException
path - UnsupportedEncodingExceptionpublic GXHTTPRequest withBody(String body)
body - public GXHTTPRequest 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 GXInboundResponse get() throws Exception
Exceptionpublic GXInboundResponse delete() throws Exception
Exceptionpublic GXInboundResponse head() throws Exception
Exceptionpublic void clear()
public GXInboundResponse put(String body) throws Exception
body - the body of the requestExceptionpublic GXInboundResponse post(String body) throws Exception
body - the body of the requestExceptionCopyright © 2018. All Rights Reserved.