Class UrlConnectionClient
- java.lang.Object
-
- org.projectnessie.client.http.impl.jdk8.UrlConnectionClient
-
- All Implemented Interfaces:
java.lang.AutoCloseable,HttpClient
public final class UrlConnectionClient extends java.lang.Object implements HttpClient
Simple Http client to make REST calls.Assumptions: - always send/receive JSON - set headers accordingly by default - very simple interactions w/ API - no cookies - no caching of connections. Could be slow
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.projectnessie.client.http.HttpClient
HttpClient.Builder, HttpClient.Method
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringUNSUPPORTED_CONFIG_MESSAGE
-
Constructor Summary
Constructors Constructor Description UrlConnectionClient(HttpRuntimeConfig config)Construct an HTTP client with a universal Accept header.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.net.URIgetBaseUri()HttpRequestnewRequest()
-
-
-
Field Detail
-
UNSUPPORTED_CONFIG_MESSAGE
public static final java.lang.String UNSUPPORTED_CONFIG_MESSAGE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UrlConnectionClient
public UrlConnectionClient(HttpRuntimeConfig config)
Construct an HTTP client with a universal Accept header.- Parameters:
config- http client configuration
-
-
Method Detail
-
newRequest
public HttpRequest newRequest()
- Specified by:
newRequestin interfaceHttpClient
-
getBaseUri
public java.net.URI getBaseUri()
- Specified by:
getBaseUriin interfaceHttpClient
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceHttpClient
-
-