Package org.takes.rs
Class RsBodyPrint
- java.lang.Object
-
- org.takes.rs.RsBodyPrint
-
- All Implemented Interfaces:
org.cactoos.Text
public final class RsBodyPrint extends Object implements org.cactoos.Text
Response body decorator that can print an entire textual (!) body response in HTTP format.This class is mostly used for testing. Don't use it for production code, since it will break the binary content of your HTTP response. It's only suitable for texts in HTTP responses.
The class is immutable and thread-safe.
- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description RsBodyPrint(Response res)
Ctor.
-
-
-
Constructor Detail
-
RsBodyPrint
public RsBodyPrint(Response res)
Ctor.- Parameters:
res
- Original response
-
-
Method Detail
-
asString
public String asString() throws IOException
- Specified by:
asString
in interfaceorg.cactoos.Text
- Throws:
IOException
-
-