@Response(code=307, description="Temporary Redirect") @BeanIgnore public class TemporaryRedirect extends HttpResponse
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() |
TemporaryRedirect |
header(String name,
Object val)
Add an HTTP header to this response.
|
getHeaders, 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
- public TemporaryRedirect(URI location)
location
- @ResponseHeader(name="Location", description="Temporary location of resource.") public URI getLocation()
public TemporaryRedirect header(String name, Object val)
HttpResponse
header
in class HttpResponse
name
- The header name.val
- The header value.Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.