SimpleHttpClient

org.llm4s.imagegeneration.provider.SimpleHttpClient
class SimpleHttpClient(llm4sClient: Llm4sHttpClient) extends HttpClient

HttpClient over the shared org.llm4s.http.Llm4sHttpClient. That client reports a transport failure as a Left; this adapter turns it into a Failure holding an the exception that caused it where the error carries one (as a connection failure or timeout does), else an IOException with the error's message - so the image clients' Try-based error handling sees what it saw when the client threw.

Attributes

Graph
Supertypes
trait HttpClient
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def get(url: String, headers: Map[String, String], timeout: FiniteDuration): Try[HttpResponse]

Attributes

Definition Classes
override def post(url: String, headers: Map[String, String], data: String, timeout: FiniteDuration): Try[HttpResponse]

Attributes

Definition Classes
override def postBytes(url: String, headers: Map[String, String], data: Array[Byte], timeout: FiniteDuration): Try[HttpResponse]

Attributes

Definition Classes
override def postMultipart(url: String, headers: Map[String, String], data: Seq[MultipartPart], timeout: FiniteDuration): Try[HttpResponse]

Attributes

Definition Classes
override def postRaw(url: String, headers: Map[String, String], data: String, timeout: FiniteDuration): Try[HttpRawResponse]

POST with a string body and return raw bytes, bypassing charset decoding.

POST with a string body and return raw bytes, bypassing charset decoding.

Attributes

Definition Classes