@Response(code=308, description="Permanent Redirect") @BeanIgnore public class PermanentRedirect extends HttpResponse
The request and all future requests should be repeated using another URI. 307 and 308 parallel the behaviors of 302 and 301, but do not allow the HTTP method to change. So, for example, submitting a form to a permanently redirected resource may continue smoothly.
Modifier and Type | Field and Description |
---|---|
static int |
CODE
HTTP status code
|
static PermanentRedirect |
INSTANCE
Reusable instance.
|
static String |
MESSAGE
Default message
|
Constructor and Description |
---|
PermanentRedirect()
Constructor using HTTP-standard message.
|
PermanentRedirect(String message)
Constructor with no redirect.
|
PermanentRedirect(String message,
URI location)
Constructor using custom message.
|
PermanentRedirect(URI location)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
URI |
getLocation() |
toString
public static final int CODE
public static final String MESSAGE
public static final PermanentRedirect INSTANCE
public PermanentRedirect()
public PermanentRedirect(String message)
Used for end-to-end interfaces.
message
- Message to send as the response.public PermanentRedirect(String message, URI location)
message
- Message to send as the response.location
- public PermanentRedirect(URI location)
location
- @ResponseHeader(name="Location", description="New location of resource.") public URI getLocation()
Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.