HttpBinaryResponse
classin packageklyn.net
public class HttpBinaryResponse
HttpBinaryResponse

HTTP response containing the exact response bytes, without text decoding. Use HttpResponse for text with charset decoding. Binary responses preserve NUL bytes and non-Unicode contents such as PNG, ZIP or PDF files.

Example

image = HttpClient().getBinary("https://example.com/logo.png"); print(image.content.size)

Fields
Modifier and Type Member Description
public readonly content
content as Byte[]
Undecoded entity bytes.
public readonly headers
headers as SortedMap<String, String>
Response headers.
public readonly httpMethod
httpMethod as String
Request method.
public readonly statusCode
statusCode as Int
HTTP response status.
public readonly url
url as String
Effective URL after redirects.
Properties
Modifier and Type Member Description
public readonly property ok
ok as Boolean
Whether status is in [200,299].