public class HeaderLinksResponseEntity<T extends ResourceSupport>
extends org.springframework.http.ResponseEntity<T>
ResponseEntity
that exposes Link
instances in the contained ResourceSupport
as link
headers instead of in the body. Note, that this class is not intended to be used directly from user code but by
support code that will transparently invoke the header exposure. If you use this class from a controller directly,
the Link
s will not be present in the ResourceSupport
instance anymore when ResourceProcessor
s
kick in.Modifier and Type | Method and Description |
---|---|
static <S extends ResourceSupport> |
wrap(org.springframework.http.HttpEntity<S> entity)
Wraps the given
HttpEntity into a HeaderLinksResponseEntity . |
public static <S extends ResourceSupport> HeaderLinksResponseEntity<S> wrap(org.springframework.http.HttpEntity<S> entity)
HttpEntity
into a HeaderLinksResponseEntity
. Will default the status code to
HttpStatus.OK
if the given value is not a ResponseEntity
.entity
- must not be null.Copyright © 2012-2016–2017 Pivotal, Inc.. All rights reserved.