Package org.projectnessie.client.http
Class HttpRequest
java.lang.Object
org.projectnessie.client.http.HttpRequest
- All Implemented Interfaces:
ExecutableHttpRequest<HttpClientException,RuntimeException>
- Direct Known Subclasses:
BaseHttpRequest
public abstract class HttpRequest
extends Object
implements ExecutableHttpRequest<HttpClientException,RuntimeException>
Class to hold an ongoing HTTP request and its parameters/filters.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected final HttpRuntimeConfigprotected Stringprotected final HttpHeadersprotected final UriBuilder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontentsType(String contentType) delete()abstract HttpResponseexecuteRequest(HttpClient.Method method, Object body) get()Sets the content-type to application/x-www-form-urlencoded.queryParam(String name, Integer value) queryParam(String name, String value) resolveTemplate(String name, String value) <E extends Exception>
ExecutableHttpRequest<E,RuntimeException> <E1 extends Exception,E2 extends Exception>
ExecutableHttpRequest<E1,E2>
-
Field Details
-
config
-
uriBuilder
-
headers
-
contentsType
-
accept
-
-
Constructor Details
-
HttpRequest
-
-
Method Details
-
contentsType
-
accept
-
path
-
queryParam
-
queryParam
-
header
-
executeRequest
public abstract HttpResponse executeRequest(HttpClient.Method method, Object body) throws HttpClientException - Throws:
HttpClientException
-
get
- Specified by:
getin interfaceExecutableHttpRequest<HttpClientException,RuntimeException> - Throws:
HttpClientException
-
delete
- Specified by:
deletein interfaceExecutableHttpRequest<HttpClientException,RuntimeException> - Throws:
HttpClientException
-
post
- Specified by:
postin interfaceExecutableHttpRequest<HttpClientException,RuntimeException> - Throws:
HttpClientException
-
put
- Specified by:
putin interfaceExecutableHttpRequest<HttpClientException,RuntimeException> - Throws:
HttpClientException
-
postForm
Sets the content-type to application/x-www-form-urlencoded. The provided body will be automatically encoded as form data. This is a convenience method forcontentsType("application/x-www-form-urlencoded").post(obj). The request should be sent withpost(Object). -
resolveTemplate
-
unwrap
-
unwrap
public <E1 extends Exception,E2 extends Exception> ExecutableHttpRequest<E1,E2> unwrap(Class<E1> ex1, Class<E2> ex2)
-