Skip to content

Commit

Permalink
Added Response.addLocationHeader(String) to facilitate adding Locatio…
Browse files Browse the repository at this point in the history
…n header on create().
  • Loading branch information
tfredrich committed May 14, 2012
1 parent 8b8f40a commit 1e0cd71
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/java/com/strategicgains/restexpress/Response.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.util.Map;
import java.util.Set;

import org.jboss.netty.handler.codec.http.HttpHeaders;
import org.jboss.netty.handler.codec.http.HttpResponseStatus;

import com.strategicgains.restexpress.query.QueryRange;
Expand Down Expand Up @@ -141,6 +142,11 @@ public void addRangeHeader(QueryRange range, long count)
{
addHeader(CONTENT_RANGE_HEADER_NAME, range.toString() + "/" + count);
}

public void addLocationHeader(String url)
{
addHeader(HttpHeaders.Names.LOCATION, url);
}

/**
* Set the HTTP response status code.
Expand Down

0 comments on commit 1e0cd71

Please sign in to comment.