Class GXHTTPRequestBuilder
java.lang.Object
org.gcube.common.gxhttp.reference.GXHTTPRequestBuilder
Builder for GXHTTP Requests.
- Author:
- Manuele Simi (ISTI CNR), Luca Frosini (ISTI-CNR)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears all the parameter except the address.connect()delete()Sends the DELETE request to the web application.Sets the identity user agent associated to the request.get()Sends the GET request to the web application.head()Sends the HEAD request to the web application.Add headers to the request.options()patch()Adds s positional path parameter to the request.post()purge()Sends the PURGE request to the web application.put()queryParams(Map<String, String> parameters) Sets the query parameters for the request.trace()
-
Field Details
-
logger
protected static final org.slf4j.Logger logger -
connection
-
UUID_REGEX
- See Also:
-
-
Constructor Details
-
GXHTTPRequestBuilder
public GXHTTPRequestBuilder()
-
-
Method Details
-
from
Sets the identity user agent associated to the request.- Parameters:
agent-- Returns:
- the request
-
path
Adds s positional path parameter to the request.- Parameters:
path-- Returns:
- the request
- Throws:
UnsupportedEncodingException
-
queryParams
public GXHTTPRequestBuilder queryParams(Map<String, String> parameters) throws UnsupportedEncodingExceptionSets the query parameters for the request.- Parameters:
parameters- the parameters that go in the URL after the address and the path params.- Returns:
- the request
- Throws:
UnsupportedEncodingException
-
header
Add headers to the request.- Parameters:
name-value-
-
put
- Throws:
Exception
-
post
- Throws:
Exception
-
get
Sends the GET request to the web application.- Returns:
- the response
- Throws:
Exception
-
delete
Sends the DELETE request to the web application.- Returns:
- the response
- Throws:
Exception
-
purge
Sends the PURGE request to the web application.- Returns:
- the response
- Throws:
Exception
-
head
Sends the HEAD request to the web application.- Returns:
- the response
- Throws:
Exception
-
clear
public void clear()Clears all the parameter except the address. -
trace
- Throws:
Exception
-
patch
- Throws:
Exception
-
options
- Throws:
Exception
-
connect
- Throws:
Exception
-