HttpRawResponse

org.llm4s.http.HttpRawResponse
See theHttpRawResponse companion object
@Stable
final case class HttpRawResponse

HTTP response wrapper for binary (non-text) response bodies.

Use this instead of HttpResponse when the response body is binary data (e.g. image bytes) to avoid lossy charset decoding.

Value parameters

body

Raw response bytes — exact wire representation, no charset conversion

headers

Response headers as a multi-valued map (lowercase keys) Build one with HttpRawResponse.apply and change it with the with* setters; the constructor and copy are private, so a new field never breaks callers.

statusCode

HTTP status code

Attributes

Companion
object
Source
Llm4sHttpClient.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def header(name: String): Option[String]

First value of header name, matched case-insensitively.

First value of header name, matched case-insensitively.

Attributes

Source
Llm4sHttpClient.scala

This response as Llm4sHttpClient.send returns one: what a test double's send answers with.

This response as Llm4sHttpClient.send returns one: what a test double's send answers with.

Attributes

Source
Llm4sHttpClient.scala

Sets the raw response bytes.

Sets the raw response bytes.

Attributes

Source
Llm4sHttpClient.scala

Sets the response headers (a multi-valued map with lowercase keys).

Sets the response headers (a multi-valued map with lowercase keys).

Attributes

Source
Llm4sHttpClient.scala
def withStatusCode(statusCode: Int): HttpRawResponse

Sets the HTTP status code.

Sets the HTTP status code.

Attributes

Source
Llm4sHttpClient.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product