com.uncarved.helpers.http.BasicClient

class RequestInterceptor

[source: com/uncarved/helpers/http/BasicClient.scala]

class RequestInterceptor
extends org.apache.http.HttpRequestInterceptor with CanLog
This class is used to intercept outgoing Http requests and modify them. This enables us to do conditional get and transparent gzip encoding so we are slightly more polite web citizens.
Values and Variables inherited from CanLog
loggerName, logger
Method Summary
def process (req : org.apache.http.HttpRequest, ctx : org.apache.http.protocol.HttpContext) : Unit
Intercepts a single outgoing request and modifies it to add headers to allow conditional get and transparent gzip support.
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
def process(req : org.apache.http.HttpRequest, ctx : org.apache.http.protocol.HttpContext) : Unit
Intercepts a single outgoing request and modifies it to add headers to allow conditional get and transparent gzip support.
Parameters
req - the http request itself
ctx - some context information
Overrides
org.apache.http.HttpRequestInterceptor.org.apache.http.HttpRequestInterceptor.process