WSRequestHelper
io.cequence.openaiscala.service.ws.WSRequestHelper
Base class for web services with handy GET, POST, and DELETE request builders, and response handling
Attributes
- Since:
Jan 2023
- Graph
- Supertypes
Members list
Concise view
Type members
Types
Value members
Concrete methods
protected def execDELETE(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])]): Future[JsValue]
protected def execDELETEWithStatus(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])], acceptableStatusCodes: Seq[Int]): Future[RichJsResponse]
protected def execGETJsonAux(request: StandaloneWSRequest, endPointForLogging: Option[PEP], acceptableStatusCodes: Seq[Int]): Future[RichJsResponse]
protected def execGETStringAux(request: StandaloneWSRequest, endPointForLogging: Option[PEP], acceptableStatusCodes: Seq[Int]): Future[RichStringResponse]
protected def execGETWithStatus(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])], acceptableStatusCodes: Seq[Int]): Future[RichJsResponse]
protected def execPOSTJsonAux[T : BodyWritable](request: StandaloneWSRequest, body: T, endPointForLogging: Option[PEP], acceptableStatusCodes: Seq[Int]): Future[RichJsResponse]
protected def execPOSTMultipart(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])], fileParams: Seq[(PT, File, Option[String])], bodyParams: Seq[(PT, Option[Any])]): Future[JsValue]
Attributes
- fileParams
the third param in a tuple is a display (header) file name
protected def execPOSTMultipartWithStatus(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])], fileParams: Seq[(PT, File, Option[String])], bodyParams: Seq[(PT, Option[Any])], acceptableStatusCodes: Seq[Int]): Future[RichJsResponse]
Attributes
- fileParams
the third param in a tuple is a display (header) file name
protected def execPOSTMultipartWithStatusString(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])], fileParams: Seq[(PT, File, Option[String])], bodyParams: Seq[(PT, Option[Any])], acceptableStatusCodes: Seq[Int]): Future[RichStringResponse]
Attributes
- fileParams
the third param in a tuple is a display (header) file name
protected def execPOSTSource(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])], bodyParams: Seq[(PT, Option[JsValue])]): Future[Source[ByteString, _]]
protected def execPOSTSourceAux[T : BodyWritable](request: StandaloneWSRequest, body: T, endPointForLogging: Option[PEP], acceptableStatusCodes: Seq[Int]): Future[RichSourceResponse]
protected def execPOSTSourceWithStatus(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])], bodyParams: Seq[(PT, Option[JsValue])], acceptableStatusCodes: Seq[Int]): Future[RichSourceResponse]
protected def execPOSTStringAux[T : BodyWritable](request: StandaloneWSRequest, body: T, endPointForLogging: Option[PEP], acceptableStatusCodes: Seq[Int]): Future[RichStringResponse]
protected def execPOSTWithStatus(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])], bodyParams: Seq[(PT, Option[JsValue])], acceptableStatusCodes: Seq[Int]): Future[RichJsResponse]
protected def getWSRequest(endPoint: Option[PEP], endPointParam: Option[String], params: Seq[(String, Any)]): StandaloneWSRequest
protected def getWSRequestOptional(endPoint: Option[PEP], endPointParam: Option[String], params: Seq[(String, Option[Any])]): StandaloneWSRequest