JsonHttpResponse

org.llm4s.http.JsonHttpResponse
See theJsonHttpResponse companion object
@Stable
final case class JsonHttpResponse

An HTTP response whose body has been parsed as JSON (see HttpResponse.toJson).

Value parameters

body

Response body parsed as JSON

headers

Response headers as a multi-valued map (lowercase keys) Build one with JsonHttpResponse.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
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

def withBody(body: Value): JsonHttpResponse

Sets the response body, parsed as JSON.

Sets the response body, parsed as JSON.

Attributes

def withHeaders(headers: Map[String, Seq[String]]): JsonHttpResponse

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

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

Attributes

def withStatusCode(statusCode: Int): JsonHttpResponse

Sets the HTTP status code.

Sets the HTTP status code.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product