public final class TsWithHeaders extends Object implements Takes
Takes.NotFoundException
Constructor and Description |
---|
TsWithHeaders(Takes takes)
Ctor.
|
TsWithHeaders(Takes takes,
Collection<String> hdrs)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
Take |
route(Request request)
Dispatch this request.
|
TsWithHeaders |
with(String text)
With this header.
|
TsWithHeaders |
with(String name,
String value)
With this header.
|
public TsWithHeaders(Takes takes)
takes
- Original takespublic TsWithHeaders(Takes takes, Collection<String> hdrs)
takes
- Original takeshdrs
- Headerspublic Take route(Request request) throws IOException
Takes
route
in interface Takes
request
- The request to dispatchIOException
- If failspublic TsWithHeaders with(String text)
text
- Header textpublic TsWithHeaders with(String name, String value)
name
- The namevalue
- The valueCopyright © 2015 Takes. All rights reserved.