Package org.citrusframework.http.client
Class HttpClientBuilder
java.lang.Object
org.citrusframework.endpoint.AbstractEndpointBuilder<HttpClient>
org.citrusframework.http.client.HttpClientBuilder
- All Implemented Interfaces:
EndpointBuilder<HttpClient>
- Since:
- 2.5
-
Field Summary
Fields inherited from interface org.citrusframework.endpoint.EndpointBuilder
logger, RESOURCE_PATH, TYPE_RESOLVER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the user authentication.binaryMediaTypes(List<org.springframework.http.MediaType> binaryMediaTypes) Sets the binaryMediaTypes.Sets the default charset.contentType(String contentType) Sets the content type.correlator(MessageCorrelator correlator) Sets the message correlator.defaultAcceptHeader(boolean flag) Sets the default accept header.disableRedirectHandling(boolean flag) Sets the disabled redirect handling property.endpointResolver(EndpointUriResolver resolver) Sets the endpoint uri resolver.errorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler) Sets the error handler.errorHandlingStrategy(ErrorHandlingStrategy errorStrategy) Sets the error handling strategy.protected HttpClienthandleCookies(boolean flag) Sets the handleCookies property.headerMapper(org.springframework.integration.http.support.DefaultHttpHeaderMapper headerMapper) Sets the header mapper.interceptor(org.springframework.http.client.ClientHttpRequestInterceptor interceptor) Sets a client single interceptor.interceptors(List<org.springframework.http.client.ClientHttpRequestInterceptor> interceptors) Sets the client interceptors.messageConverter(HttpMessageConverter messageConverter) Sets the message converter.pollingInterval(int pollingInterval) Sets the polling interval.requestFactory(org.springframework.http.client.ClientHttpRequestFactory requestFactory) Sets the request factory.requestMethod(org.springframework.web.bind.annotation.RequestMethod requestMethod) Sets the request method.requestUrl(String uri) Sets the requestUrl property.restTemplate(org.springframework.web.client.RestTemplate restTemplate) Sets the rest template.secured(HttpSecureConnection conn) Enable secured connection on the client using provided SSL connection.timeout(long timeout) Sets the default timeout.Methods inherited from class org.citrusframework.endpoint.AbstractEndpointBuilder
actor, build, initialize, name, referenceResolver, supportsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.citrusframework.endpoint.EndpointBuilder
build, build
-
Constructor Details
-
HttpClientBuilder
public HttpClientBuilder()
-
-
Method Details
-
getEndpoint
- Specified by:
getEndpointin classAbstractEndpointBuilder<HttpClient>
-
requestUrl
Sets the requestUrl property.- Parameters:
uri-- Returns:
-
restTemplate
Sets the rest template.- Parameters:
restTemplate-- Returns:
-
requestFactory
public HttpClientBuilder requestFactory(org.springframework.http.client.ClientHttpRequestFactory requestFactory) Sets the request factory.- Parameters:
requestFactory-- Returns:
-
requestMethod
public HttpClientBuilder requestMethod(org.springframework.web.bind.annotation.RequestMethod requestMethod) Sets the request method.- Parameters:
requestMethod-- Returns:
-
messageConverter
Sets the message converter.- Parameters:
messageConverter-- Returns:
-
correlator
Sets the message correlator.- Parameters:
correlator-- Returns:
-
endpointResolver
Sets the endpoint uri resolver.- Parameters:
resolver-- Returns:
-
charset
Sets the default charset.- Parameters:
charset-- Returns:
-
defaultAcceptHeader
Sets the default accept header.- Parameters:
flag-- Returns:
-
handleCookies
Sets the handleCookies property.- Parameters:
flag-- Returns:
-
disableRedirectHandling
Sets the disabled redirect handling property.- Parameters:
flag-- Returns:
-
contentType
Sets the content type.- Parameters:
contentType-- Returns:
-
pollingInterval
Sets the polling interval.- Parameters:
pollingInterval-- Returns:
-
errorHandlingStrategy
Sets the error handling strategy.- Parameters:
errorStrategy-- Returns:
-
errorHandler
public HttpClientBuilder errorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler) Sets the error handler.- Parameters:
errorHandler-- Returns:
-
interceptors
public HttpClientBuilder interceptors(List<org.springframework.http.client.ClientHttpRequestInterceptor> interceptors) Sets the client interceptors.- Parameters:
interceptors-- Returns:
-
binaryMediaTypes
public HttpClientBuilder binaryMediaTypes(List<org.springframework.http.MediaType> binaryMediaTypes) Sets the binaryMediaTypes.- Parameters:
binaryMediaTypes-- Returns:
-
interceptor
public HttpClientBuilder interceptor(org.springframework.http.client.ClientHttpRequestInterceptor interceptor) Sets a client single interceptor.- Parameters:
interceptor-- Returns:
-
headerMapper
public HttpClientBuilder headerMapper(org.springframework.integration.http.support.DefaultHttpHeaderMapper headerMapper) Sets the header mapper.- Parameters:
headerMapper-- Returns:
-
timeout
Sets the default timeout.- Parameters:
timeout-- Returns:
-
authentication
Sets the user authentication.- Parameters:
auth-- Returns:
-
secured
Enable secured connection on the client using provided SSL connection.- Returns:
-