@Response(code=307, description="Temporary Redirect") @BeanIgnore public class TemporaryRedirect extends HttpResponse
HTTP 307 Temporary Redirect
response.
In this case, the request should be repeated with another URI; however, future requests should still use the original URI. In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request. For example, a POST request should be repeated using another POST request.
Modifier and Type | Field and Description |
---|---|
static int |
CODE
HTTP status code
|
static TemporaryRedirect |
INSTANCE
Reusable instance.
|
static String |
MESSAGE
Default message
|
Constructor and Description |
---|
TemporaryRedirect()
Constructor using HTTP-standard message.
|
TemporaryRedirect(String message)
Constructor with no redirect.
|
TemporaryRedirect(String message,
URI location)
Constructor using custom message.
|
TemporaryRedirect(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 TemporaryRedirect INSTANCE
public TemporaryRedirect()
public TemporaryRedirect(String message)
Used for end-to-end interfaces.
message
- Message to send as the response.public TemporaryRedirect(String message, URI location)
message
- Message to send as the response.location
- Location
header value.public TemporaryRedirect(URI location)
location
- Location
header value.@ResponseHeader(name="Location", description="Temporary location of resource.") public URI getLocation()
Location
header value.Copyright © 2018 Apache. All rights reserved.