org.llm4s.http

package org.llm4s.http

Members list

Type members

Classlikes

case class HttpRawResponse(statusCode: Int, body: Array[Byte])

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

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

statusCode

HTTP status code

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class HttpResponse(statusCode: Int, body: String, headers: Map[String, Seq[String]])

HTTP response wrapper exposing status code, body, and headers.

HTTP response wrapper exposing status code, body, and headers.

Value parameters

body

Response body as a string

headers

Response headers as a multi-valued map (lowercase keys)

statusCode

HTTP status code (e.g. 200, 404)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Abstraction for HTTP client to enable dependency injection and testing.

Abstraction for HTTP client to enable dependency injection and testing.

All methods accept timeout in milliseconds. Headers are passed as single-valued maps. The implementation never throws on non-2xx status codes — callers inspect HttpResponse.statusCode themselves.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait MultipartPart

Represents a single part in a multipart/form-data request.

Represents a single part in a multipart/form-data request.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class FilePart
class TextField
object MultipartPart

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
case class StreamingHttpResponse(statusCode: Int, body: InputStream)

HTTP response wrapper for streaming (InputStream-based) response bodies.

HTTP response wrapper for streaming (InputStream-based) response bodies.

Use this instead of HttpResponse when the response body must be consumed incrementally (e.g. server-sent events, JSON lines).

Value parameters

body

Response body as an InputStream — caller is responsible for closing it

statusCode

HTTP status code

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all