com.groupbyinc.flux.client.RequestLogger.class Maven / Gradle / Ivy
???? 3$ (com/groupbyinc/flux/client/RequestLogger java/lang/Object RequestLogger.java tracer 7Lcom/groupbyinc/flux/common/apache/commons/logging/Log; ()V
this *Lcom/groupbyinc/flux/client/RequestLogger; logResponse ?(Lcom/groupbyinc/flux/common/apache/commons/logging/Log;Lcom/groupbyinc/flux/common/apache/http/client/methods/HttpUriRequest;Lcom/groupbyinc/flux/common/apache/http/HttpHost;Lcom/groupbyinc/flux/common/apache/http/HttpResponse;)V java/io/IOException 5com/groupbyinc/flux/common/apache/commons/logging/Log isDebugEnabled ()Z java/lang/StringBuilder
request [ append -(Ljava/lang/String;)Ljava/lang/StringBuilder;
Dcom/groupbyinc/flux/common/apache/http/client/methods/HttpUriRequest ! getMethod ()Ljava/lang/String; # $ " % ' -(Ljava/lang/Object;)Ljava/lang/StringBuilder; )
* getRequestLine 6()Lcom/groupbyinc/flux/common/apache/http/RequestLine; , - " . getUri H(Lcom/groupbyinc/flux/common/apache/http/RequestLine;)Ljava/lang/String; 0 1
2 ] returned [ 4 3com/groupbyinc/flux/common/apache/http/HttpResponse 6
getStatusLine 5()Lcom/groupbyinc/flux/common/apache/http/StatusLine; 8 9 7 : ] < toString > $
? debug (Ljava/lang/Object;)V A B C
isWarnEnabled E F Warning H
getHeaders D(Ljava/lang/String;)[Lcom/groupbyinc/flux/common/apache/http/Header; J K 7 L buildWarningMessage ?(Lcom/groupbyinc/flux/common/apache/http/client/methods/HttpUriRequest;Lcom/groupbyinc/flux/common/apache/http/HttpHost;[Lcom/groupbyinc/flux/common/apache/http/Header;)Ljava/lang/String; N O
P warn R B S U isTraceEnabled W X buildTraceRequest ?(Lcom/groupbyinc/flux/common/apache/http/client/methods/HttpUriRequest;Lcom/groupbyinc/flux/common/apache/http/HttpHost;)Ljava/lang/String; Z [
\ ^ .error while reading request for trace purposes ` trace *(Ljava/lang/Object;Ljava/lang/Throwable;)V b c d java/lang/String f buildTraceResponse I(Lcom/groupbyinc/flux/common/apache/http/HttpResponse;)Ljava/lang/String; h i
j /error while reading response for trace purposes l (C)Ljava/lang/StringBuilder; n
o b B q warnings 0[Lcom/groupbyinc/flux/common/apache/http/Header; requestLine Ljava/lang/String; e Ljava/io/IOException; responseLine logger request FLcom/groupbyinc/flux/common/apache/http/client/methods/HttpUriRequest; host 1Lcom/groupbyinc/flux/common/apache/http/HttpHost; httpResponse 5Lcom/groupbyinc/flux/common/apache/http/HttpResponse; logFailedRequest ?(Lcom/groupbyinc/flux/common/apache/commons/logging/Log;Lcom/groupbyinc/flux/common/apache/http/client/methods/HttpUriRequest;Lcom/groupbyinc/flux/common/apache/http/HttpHost;Ljava/lang/Exception;)V ] failed ? A c ? traceRequest e1 Ljava/lang/Exception; (Ljava/lang/String;)V ?
? ] returned ? (I)Ljava/lang/StringBuilder; ?
? warnings: ? , ? [ ? -com/groupbyinc/flux/common/apache/http/Header ? getValue ? $ ? ? i I message Ljava/lang/StringBuilder; curl -iX ? ' ? ' ? Acom/groupbyinc/flux/common/apache/http/HttpEntityEnclosingRequest ? getEntity 5()Lcom/groupbyinc/flux/common/apache/http/HttpEntity; ? ? ? ? -d ' ? 1com/groupbyinc/flux/common/apache/http/HttpEntity ? isRepeatable ? ? ? @com/groupbyinc/flux/common/apache/http/entity/BufferedHttpEntity ? 6(Lcom/groupbyinc/flux/common/apache/http/HttpEntity;)V ?
? ? setEntity ? ? ? ? !java/nio/charset/StandardCharsets ? UTF_8 Ljava/nio/charset/Charset; ? ? ? ? 7com/groupbyinc/flux/common/apache/http/util/EntityUtils ? a(Lcom/groupbyinc/flux/common/apache/http/HttpEntity;Ljava/nio/charset/Charset;)Ljava/lang/String; > ?
? ? entity 3Lcom/groupbyinc/flux/common/apache/http/HttpEntity; enclosingRequest CLcom/groupbyinc/flux/common/apache/http/HttpEntityEnclosingRequest; java/lang/Throwable ? # ?
getAllHeaders 2()[Lcom/groupbyinc/flux/common/apache/http/Header; ? ? 7 ? t
# ? getName ? $ ? ? : ?
# ? 7 ? 7 ? 9com/groupbyinc/flux/common/apache/http/entity/ContentType ? get p(Lcom/groupbyinc/flux/common/apache/http/HttpEntity;)Lcom/groupbyinc/flux/common/apache/http/entity/ContentType; ? ?
? ?
getCharset ()Ljava/nio/charset/Charset; ? ?
? ? java/nio/charset/Charset ? java/io/BufferedReader ? java/io/InputStreamReader ?
getContent ()Ljava/io/InputStream; ? ? ? ? 2(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V ?
? ? (Ljava/io/Reader;)V ?
? ? readLine ? $
? ? close ?
? ?
addSuppressed (Ljava/lang/Throwable;)V ?
? header /Lcom/groupbyinc/flux/common/apache/http/Header; line reader Ljava/io/BufferedReader; contentType ;Lcom/groupbyinc/flux/common/apache/http/entity/ContentType; charset 2com/groupbyinc/flux/common/apache/http/RequestLine 0 $
charAt (I)C
g / 4Lcom/groupbyinc/flux/common/apache/http/RequestLine;