public X handle(HttpWebResponse response) { X result = default(X); responseHeaders = new Dictionary <String, String>(); foreach (String key in response.Headers.AllKeys) { responseHeaders.Add(key, response.Headers[key]); } if (responseUnmarshaller != null) { result = responseUnmarshaller.unmarshall(response.GetResponseStream()); } return(result); }