class Client extends RequestTypes with RequestBuilding
A REST client with a given base URL.
- Alphabetic
- By Inheritance
- Client
- RequestBuilding
- RequestTypes
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Client(baseUrl: URL, charset: Charset = StandardCharsets.UTF_8)
Type Members
-
sealed
trait
CanBuildRequest
[T] extends AnyRef
Represents evidence that the request can be built.
Represents evidence that the request can be built. For requests that include content, this requires that an implicit content.Encoder is available for the given Content-Type.
- T
request type
- Definition Classes
- RequestBuilding
- Annotations
- @implicitNotFound( ... )
-
case class
DeleteRequest
[Accept <: Coproduct](url: URL, headers: List[(String, String)] = List.empty, charset: Charset = StandardCharsets.UTF_8) extends Client.RequestSyntax[Accept, Client.DeleteRequest[Accept]] with Product with Serializable
- Definition Classes
- RequestTypes
-
case class
FormPostRequest
[Accept <: Coproduct, Elements <: Either[None.type, NonEmptyList[ValidatedNel[Throwable, FormElement]]]](url: URL, form: Elements = Left(None), multipart: Boolean = false, headers: List[(String, String)] = List.empty, charset: Charset = StandardCharsets.UTF_8) extends Client.RequestSyntax[Accept, Client.FormPostRequest[Accept, Elements]] with Product with Serializable
- Definition Classes
- RequestTypes
-
case class
GetRequest
[Accept <: Coproduct](url: URL, headers: List[(String, String)] = List.empty, charset: Charset = StandardCharsets.UTF_8) extends Client.RequestSyntax[Accept, Client.GetRequest[Accept]] with Product with Serializable
- Definition Classes
- RequestTypes
-
case class
HeadRequest
(url: URL, headers: List[(String, String)] = List.empty, charset: Charset = StandardCharsets.UTF_8) extends Client.RequestSyntax[Nothing, Client.HeadRequest] with Product with Serializable
- Definition Classes
- RequestTypes
-
case class
PostRequest
[Content, ContentType, Accept <: Coproduct](url: URL, content: Content, headers: List[(String, String)] = List.empty, charset: Charset = StandardCharsets.UTF_8) extends Client.RequestSyntax[Accept, Client.PostRequest[Content, ContentType, Accept]] with Product with Serializable
- Definition Classes
- RequestTypes
-
case class
PutRequest
[Content, ContentType, Accept <: Coproduct](url: URL, content: Content, headers: List[(String, String)] = List.empty, charset: Charset = StandardCharsets.UTF_8) extends Client.RequestSyntax[Accept, Client.PutRequest[Content, ContentType, Accept]] with Product with Serializable
- Definition Classes
- RequestTypes
-
sealed
trait
RequestSyntax
[Accept <: Coproduct, Self <: Client.RequestSyntax[Accept, Self]] extends AnyRef
- Definition Classes
- RequestTypes
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
val
client: com.twitter.finagle.Http.Client
- Attributes
- protected
-
def
clientTransform(client: com.twitter.finagle.Http.Client): com.twitter.finagle.Http.Client
- Attributes
- protected
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
close(): Unit
Close this client releasing allocated resources.
-
def
delete(relativePath: String): DeleteRequest[:+:[String("*/*"), CNil]]
Specify a DELETE request to be performed against the given resource
Specify a DELETE request to be performed against the given resource
- relativePath
The path to the resource, relative to the baseUrl
- returns
A DeleteRequest object, which can further specify and send the request
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get(relativePath: String): GetRequest[:+:[String("*/*"), CNil]]
Specify a GET request to be performed against the given resource
Specify a GET request to be performed against the given resource
- relativePath
The path to the resource, relative to the baseUrl
- returns
A GetRequest object, which can further specify and send the request
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
head(relativePath: String): HeadRequest
Specify a HEAD request to be performed against the given resource
Specify a HEAD request to be performed against the given resource
- relativePath
The path to the resource, relative to the baseUrl
- returns
A HeadRequest object, which can further specify and send the request
-
val
httpClient: Service[Request, Response]
- Attributes
- protected[featherbed]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
post(relativePath: String): PostRequest[None.type, Nothing, :+:[String("*/*"), CNil]]
Specify a POST request to be performed against the given resource
Specify a POST request to be performed against the given resource
- relativePath
The path to the resource, relative to the baseUrl
- returns
A PostRequest object, which can further specify and send the request
-
def
put(relativePath: String): PutRequest[None.type, Nothing, :+:[String("*/*"), CNil]]
Specify a PUT request to be performed against the given resource
Specify a PUT request to be performed against the given resource
- relativePath
The path to the resource, relative to the baseUrl
- returns
A PutRequest object, which can further specify and send the request
-
def
serviceTransform(service: Service[Request, Response]): Service[Request, Response]
- Attributes
- protected
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
object
CanBuildRequest
- Definition Classes
- RequestBuilding