Java org.springframework.http ResponseEntity fields, constructors, methods, implement or subclass

Example usage for Java org.springframework.http ResponseEntity fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.springframework.http ResponseEntity.

The text is from its open source code.

Field

Objectstatus

Constructor

ResponseEntity(HttpStatus status)
Create a new ResponseEntity with the given status code, and no body nor headers.
ResponseEntity(@Nullable T body, HttpStatus status)
Create a new ResponseEntity with the given body and status code, and no headers.
ResponseEntity(MultiValueMap headers, HttpStatus status)
Create a new HttpEntity with the given headers and status code, and no body.
ResponseEntity(@Nullable T body, @Nullable MultiValueMap headers, HttpStatus status)
Create a new HttpEntity with the given body, headers, and status code.
ResponseEntity(@Nullable T body, @Nullable MultiValueMap headers, Object status)
Create a new HttpEntity with the given body, headers, and status code.

Method

BodyBuilderaccepted()
Create a builder with an HttpStatus#ACCEPTED ACCEPTED status.
BodyBuilderbadRequest()
Create a builder with a HttpStatus#BAD_REQUEST BAD_REQUEST status.
BodyBuildercreated(URI location)
Create a new builder with a HttpStatus#CREATED CREATED status and a location header set to the given URI.
HttpStatusgetStatusCode()
Return the HTTP status code of the response.
intgetStatusCodeValue()
Return the HTTP status code of the response.
HeadersBuildernoContent()
Create a builder with a HttpStatus#NO_CONTENT NO_CONTENT status.
HeadersBuildernotFound()
Create a builder with a HttpStatus#NOT_FOUND NOT_FOUND status.
ResponseEntityok(T body)
A shortcut for creating a ResponseEntity with the given body and the status set to HttpStatus#OK OK .
BodyBuilderok()
Create a builder with the status set to HttpStatus#OK OK .
StringtoString()
BodyBuilderunprocessableEntity()
Create a builder with an HttpStatus#UNPROCESSABLE_ENTITY UNPROCESSABLE_ENTITY status.