Package co.cryptoservice.sdk
Class RawResponse
java.lang.Object
co.cryptoservice.sdk.RawResponse
The answer to
CryptoServiceClient.request(java.lang.String, java.lang.String, byte[], java.lang.String), whatever its status: the low-level escape
hatch for routes the typed methods do not cover.-
Method Details
-
status
public int status()The HTTP status.- Returns:
- the status, 2xx or not
-
headers
The response headers.- Returns:
- the headers
-
mediaType
TheContent-Typewithout parameters, lower-cased.- Returns:
- for example
application/json, or empty when there is none
-
body
public byte[] body()The body.- Returns:
- a copy of the body bytes
-
bodyText
The body decoded as UTF-8.- Returns:
- the body text
-
toString
The status and media type only; the body may hold secrets.
-