Class HttpRequestResponseHeadersLogUtil


  • public class HttpRequestResponseHeadersLogUtil
    extends Object
    Utility for logging requests / responses.

    The utility can be used to generate HTTP request / response header log strings. Both for incoming service calls as outgoing calls (i.e. calls to backend systems).

    Since:
    3.0.0
    Author:
    Rutger Lubbers
    • Constructor Detail

      • HttpRequestResponseHeadersLogUtil

        public HttpRequestResponseHeadersLogUtil​(PasswordMaskerUtil passwordMasker)
        The constructor for the log utility.
        Parameters:
        passwordMasker - The password masker utility.
    • Method Detail

      • getTxRequestHeaders

        public String getTxRequestHeaders​(javax.servlet.http.HttpServletRequest servletRequest)
        Get request headers. With password masking.
        Parameters:
        servletRequest - The servlet request.
        Returns:
        The headers as string.
      • getTxResponseHeaders

        public String getTxResponseHeaders​(javax.servlet.http.HttpServletResponse servletResponse)
        Get response headers. With password masking.
        Parameters:
        servletResponse - The servlet response.
        Returns:
        The headers as string.
      • getCallRequestHeaders

        public String getCallRequestHeaders​(org.springframework.http.HttpRequest request)
        Get call request headers. With password masking.
        Parameters:
        request - The http request.
        Returns:
        The headers as string.
      • getCallResponseHeaders

        public String getCallResponseHeaders​(org.springframework.http.client.ClientHttpResponse response)
        Get call response headers. With password masking.
        Parameters:
        response - The http response.
        Returns:
        The headers as string.