Class HttpHeaderUtil
java.lang.Object
de.hybris.platform.customerticketingc4cintegration.facade.utils.HttpHeaderUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.HttpHeadersaddBatchHeaders(String uri) Adds basic batch headers likecreateBasicAuthHeader(String username, String password) Encoding for username/password headers.org.springframework.http.HttpHeadersenrichHeaders(org.springframework.http.HttpHeaders headers, String siteId) Make a request to a c4c system to get a special token for the other requests.org.springframework.http.HttpHeadersgetDefaultHeaders(String siteId) Makes some default http headers for communication with c4corg.springframework.http.HttpHeadersMake a request to a c4c system to get a special token for the other requests.protected org.springframework.web.client.RestTemplateprotected SitePropsHoldervoidsetRestTemplate(org.springframework.web.client.RestTemplate restTemplate) voidsetSitePropsHolder(SitePropsHolder sitePropsHolder)
-
Constructor Details
-
HttpHeaderUtil
public HttpHeaderUtil()
-
-
Method Details
-
addBatchHeaders
Adds basic batch headers like- Parameters:
uri-- Returns:
- HttpHeaders
-
getEnrichedHeaders
public org.springframework.http.HttpHeaders getEnrichedHeaders()Make a request to a c4c system to get a special token for the other requests. wrapper for enrichHeaders(final HttpHeaders headers, final String siteId)- Returns:
- enriched HttpHeaders
-
enrichHeaders
public org.springframework.http.HttpHeaders enrichHeaders(org.springframework.http.HttpHeaders headers, String siteId) Make a request to a c4c system to get a special token for the other requests.- Parameters:
headers-siteId-- Returns:
- headers with special token
-
createBasicAuthHeader
Encoding for username/password headers. Makes BasicAuthHeader- Parameters:
username-password-- Returns:
- basic authentication string header
-
getDefaultHeaders
Makes some default http headers for communication with c4c- Parameters:
siteId-- Returns:
- default headers
-
getSitePropsHolder
-
setSitePropsHolder
-
getRestTemplate
protected org.springframework.web.client.RestTemplate getRestTemplate() -
setRestTemplate
public void setRestTemplate(org.springframework.web.client.RestTemplate restTemplate)
-