Class RestResponse

    • Constructor Detail

      • RestResponse

        public RestResponse()
    • Method Detail

      • contentType

        public abstract String contentType()
        The response content type.
      • content

        public abstract BytesReference content()
        The response content. Note, if the content is Releasable it should automatically be released when done by the channel sending it.
      • status

        public abstract RestStatus status()
        The rest status code.
      • addHeader

        public void addHeader​(String name,
                              String value)
        Add a custom header.
      • getHeaders

        public Map<String,​List<String>> getHeaders()
        Returns custom headers that have been added. This method should not be used to mutate headers.