| Class Summary | |
class
|
BasicClient
extends RichClient with CanLog
Class that allows simple and scalable http requests. It wraps up all of the complexity of
HttpClient 4 and HttpCore 4 so you get cookies, redirection, transparent gzip support, and
condition get Last Modified and ETag support.
Sample usage:
|
abstract class
|
Client
extends AnyRef
Interfacte for Http clients. If this interface is implemented, we can enrich it with various
convenience functions
|
class
|
GZIPDecompressingEntity
(entity : org.apache.http.HttpEntity) extends org.apache.http.entity.HttpEntityWrapper with AnyRef
Simple wrapper entity type that takes a gzipped entity and unzips it.
Translated to scala from the Apache HttpClient 4 example code.
|
case class
|
Request
(val reqType : scala.Enumeration.Value, val url : java.lang.String, val params : scala.Seq[(java.lang.String, java.lang.String)]) extends scala.Product
Helper class that standardizes how we get request information. This
enables us to simplify the calling interfaces for our requester methods
and also our request and response interceptors and cacheing.
|
case class
|
Response
(val statusCode : Int, val response : org.apache.http.HttpResponse, val entity : scala.Option[org.apache.http.HttpEntity]) extends scala.Product
Encapsulates an HTTP response.
|
class
|
ResponseCache
extends scala.collection.mutable.HashMap[Request, ResponseCacheInfo]
The type of our http response cache, used to implement conditional get
|
case class
|
ResponseCacheInfo
extends scala.Product
Container for the header and content information that is cached to allow
conditional get to work
|
trait
|
RichClient
extends Client
Trait which uses the interface above to provide a rich and convenient http
client interface.
|
case class
|
StatusCode
(val code : Int, val reason : java.lang.String, val contents : java.lang.String) extends java.lang.Exception with scala.Product
Exception class thrown when we receive a status code we don't expect.
|
| Object Summary | |
object
|
Request
extends (scala.Enumeration.Value, java.lang.String, scala.Seq[(java.lang.String, java.lang.String)]) => Request
|
object
|
RequestType
extends scala.Enumeration
Enumeration of possible HTTP request types.
|
object
|
Response
extends (Int, org.apache.http.HttpResponse, scala.Option[org.apache.http.HttpEntity]) => Response
|
object
|
ResponseCacheInfo
extends () => ResponseCacheInfo
|
object
|
StatusCode
extends (Int, java.lang.String, java.lang.String) => StatusCode
|