public interface Redirector
Ratpack provides a default contextual implementation that uses the LaunchConfig.getPublicAddress()
to
make any relative redirect locations absolute in terms of the public address.
This strategy is typically sufficient and a user implementation of this type is not required.
@NonBlocking void redirect(Context context, String location, int code)
context
- The context to issue the redirect forlocation
- The user given location value (i.e. the location
arg to Context.redirect(int, String)
)code
- The http code to issue with the redirect