public final class TkWithHeaders extends Object implements Take
The class is immutable and thread-safe.
Constructor and Description |
---|
TkWithHeaders(Take take)
Ctor.
|
TkWithHeaders(Take take,
Collection<String> hdrs)
Ctor.
|
TkWithHeaders(Take take,
String... hdrs)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
Response |
act()
Print itself.
|
TkWithHeaders |
with(String text)
With this header.
|
TkWithHeaders |
with(String name,
String value)
With this header.
|
public TkWithHeaders(Take take)
take
- Originalpublic TkWithHeaders(Take take, String... hdrs)
take
- Originalhdrs
- Headerspublic TkWithHeaders(Take take, Collection<String> hdrs)
take
- Originalhdrs
- Headerspublic Response act() throws IOException
Take
act
in interface Take
IOException
- If failspublic TkWithHeaders with(String text)
text
- Header textpublic TkWithHeaders with(String name, String value)
name
- The namevalue
- The valueCopyright © 2015 Takes. All rights reserved.