Example usage for com.google.common.net HttpHeaders LOCATION

List of usage examples for com.google.common.net HttpHeaders LOCATION

Introduction

In this page you can find the example usage for com.google.common.net HttpHeaders LOCATION.

Prototype

String LOCATION

To view the source code for com.google.common.net HttpHeaders LOCATION.

Click Source Link

Document

The HTTP Location header field name.

Usage

From source file:com.sector91.wit.responders.Responders.java

@Override
public Html respondWithHtml(Params<?> params, Request request, Response response) {
    response.setStatus(status);/*w  w w  .  j a  va  2s. c  o  m*/
    response.setValue(HttpHeaders.LOCATION, target);
    return html.c(head.c(title.c("Redirect")),
            body.c(h1.c("Redirect"), p.c("You are being redirected to", a.href(target).c(target))));
}