com.uncarved.helpers.http.BasicClient

class ResponseInterceptor

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

class ResponseInterceptor
extends org.apache.http.HttpResponseInterceptor with CanLog
This class is used to intercept incoming Http responses 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 (res : org.apache.http.HttpResponse, ctx : org.apache.http.protocol.HttpContext) : Unit
Intercepts a single incoming response 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(res : org.apache.http.HttpResponse, ctx : org.apache.http.protocol.HttpContext) : Unit
Intercepts a single incoming response 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.HttpResponseInterceptor.org.apache.http.HttpResponseInterceptor.process