org.springframework.test.web.reactive.server

Class ExchangeResult

  • java.lang.Object
    • org.springframework.test.web.reactive.server.ExchangeResult
    • Method Detail

      • getMethod

        public HttpMethod getMethod()
        Return the method of the request.
      • getUrl

        public java.net.URI getUrl()
        Return the URI of the request.
      • getUriTemplate

        @Nullable
        public java.lang.String getUriTemplate()
        Return the original URI template used to prepare the request, if any.
      • getRequestHeaders

        public HttpHeaders getRequestHeaders()
        Return the request headers sent to the server.
      • getRequestBodyContent

        @Nullable
        public byte[] getRequestBodyContent()
        Return the raw request body content written as a byte[].
        Throws:
        java.lang.IllegalStateException - if the request body is not fully written yet.
      • getStatus

        public HttpStatus getStatus()
        Return the status of the executed request.
      • getResponseHeaders

        public HttpHeaders getResponseHeaders()
        Return the response headers received from the server.
      • getResponseCookies

        public MultiValueMap<java.lang.String,ResponseCookie> getResponseCookies()
        Return response cookies received from the server.
      • getResponseBodyContent

        @Nullable
        public byte[] getResponseBodyContent()
        Return the raw request body content written as a byte[].
        Throws:
        java.lang.IllegalStateException - if the response is not fully read yet.
      • assertWithDiagnostics

        public void assertWithDiagnostics(java.lang.Runnable assertion)
        Execute the given Runnable, catch any AssertionError, decorate with AssertionError containing diagnostic information about the request and response, and then re-throw.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object