public interface HttpRestClient extends RestClient, org.refcodes.component.LinkComponent, org.refcodes.net.BaseUrlAccessor.BaseUrlProperty, org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<HttpRestClient>
RestClient
to be capable of providing a User-Agent with
UserAgentAccessor.UserAgentMutator.setUserAgent(String)
(withUserAgent(String)
) and to be
capable of using base URLs to be set with BaseUrlAccessor.BaseUrlMutator.setBaseUrl(String)
(BaseUrlAccessor.BaseUrlBuilder.withBaseUrl(String)
).
To prepare HTTPS connections, use the methods such as:
open(File, String)
or open(File, String, String)
.
A HttpRestClient
can be shutdown via Closable.close()
.org.refcodes.net.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
org.refcodes.net.UserAgentAccessor.UserAgentBuilder<B extends org.refcodes.net.UserAgentAccessor.UserAgentBuilder<B>>, org.refcodes.net.UserAgentAccessor.UserAgentMutator, org.refcodes.net.UserAgentAccessor.UserAgentProperty
org.refcodes.component.LinkComponent.LinkAutomaton
org.refcodes.component.Openable.OpenAutomaton
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_KEYSTORE_FORMAT |
static String |
DEFAULT_SSL_PROTOCOL |
Modifier and Type | Method and Description |
---|---|
default void |
open(File aTrustStoreFile,
String aTrustStorePassword)
Same as
#open(String, File, String, String) but:
Type the type of KeyStore is set to "JKS". |
void |
open(File aTrustStoreFile,
String aTrustStoreType,
String aTrustStorePassword)
Configures the HTTPS client connection with the provided HTTPS
configuration parameters.
|
default HttpRestClient |
withBaseUrl(URL aBaseUrl) |
default HttpRestClient |
withUserAgent(String aUserAgent) |
doDelete, doDelete, doDelete, doDelete, doGet, doGet, doPost, doPost, doPost, doPost, doPut, doPut, doPut, doPut, doRequest, doRequest, doRequest, doRequest
addMediaTypeFactory
getFactoryMediaTypes, hasMediaTypeFactory, toMediaTypeFactory
static final String DEFAULT_SSL_PROTOCOL
static final String DEFAULT_KEYSTORE_FORMAT
void open(File aTrustStoreFile, String aTrustStoreType, String aTrustStorePassword) throws org.refcodes.component.OpenException
default void open(File aTrustStoreFile, String aTrustStorePassword) throws org.refcodes.component.OpenException
#open(String, File, String, String)
but:
KeyStore
is set to "JKS".
default HttpRestClient withUserAgent(String aUserAgent)
withUserAgent
in interface RestClient
withUserAgent
in interface org.refcodes.net.UserAgentAccessor.UserAgentBuilder<RestClient>
default HttpRestClient withBaseUrl(URL aBaseUrl)
withBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<HttpRestClient>
Copyright © 2017. All rights reserved.