public final class RsFluent extends RsWrap
The class is immutable and thread-safe.
Constructor and Description |
---|
RsFluent()
Ctor.
|
RsFluent(Response res)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
RsFluent |
withBody(byte[] body)
With this body.
|
RsFluent |
withBody(InputStream body)
With this body.
|
RsFluent |
withBody(String body)
With this body.
|
RsFluent |
withHeader(String header)
With this header.
|
RsFluent |
withHeader(String key,
String value)
With this header.
|
RsFluent |
withStatus(int code)
With this status code.
|
RsFluent |
withType(String ctype)
With this content type.
|
public RsFluent()
public RsFluent(Response res)
res
- Original responsepublic RsFluent withStatus(int code)
code
- Status codepublic RsFluent withHeader(String header)
header
- The headerpublic RsFluent withHeader(String key, String value)
key
- Keyvalue
- Valuepublic RsFluent withType(String ctype)
ctype
- Content typepublic RsFluent withBody(String body)
body
- Bodypublic RsFluent withBody(byte[] body)
body
- Bodypublic RsFluent withBody(InputStream body)
body
- BodyCopyright © 2015 Takes. All rights reserved.