Class HttpResponseImpl

    • Constructor Detail

      • HttpResponseImpl

        public HttpResponseImpl​(KeycloakSession session,
                                org.jboss.resteasy.spi.HttpResponse delegate)
    • Method Detail

      • setStatus

        public void setStatus​(int statusCode)
        Description copied from interface: HttpResponse
        Sets a status code.
        Specified by:
        setStatus in interface HttpResponse
        Parameters:
        statusCode - the status code
      • addHeader

        public void addHeader​(String name,
                              String value)
        Description copied from interface: HttpResponse
        Add a value to the current list of values for the header with the given name.
        Specified by:
        addHeader in interface HttpResponse
        Parameters:
        name - the header name
        value - the header value
      • setHeader

        public void setHeader​(String name,
                              String value)
        Description copied from interface: HttpResponse
        Set a header. Any existing values will be replaced.
        Specified by:
        setHeader in interface HttpResponse
        Parameters:
        name - the header name
        value - the header value
      • setWriteCookiesOnTransactionComplete

        public void setWriteCookiesOnTransactionComplete()
        Description copied from interface: HttpResponse
        Adding cookies at the end of the transaction helps when retrying a transaction might add the cookie multiple times. In some scenarios it must not be added at the end of the transaction, as at that time the response has already been sent to the caller ("committed"), so the code needs to make a choice. As retrying transactions is the exception, adding cookies at the end of the transaction is also the exception and needs to be switched on where necessary.
        Specified by:
        setWriteCookiesOnTransactionComplete in interface HttpResponse