de.tsl2.nano.core.http.HttpClient.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tsl2.nano.h5 Show documentation
Show all versions of tsl2.nano.h5 Show documentation
TSL2 Framework Html5 Extensions (WebServer, Html5Presentation, RuleCover, BeanConfigurator, LogicTable-Sheet, Expression-Descriptors for Actions, Rules, URLs, Queries)
???? = ?
java/lang/Object ()V !de/tsl2/nano/core/http/HttpClient
de/tsl2/nano/core/log/LogFactory getLog 3(Ljava/lang/Class;)Lorg/apache/commons/logging/Log; LOG Lorg/apache/commons/logging/Log;
createHttpConnection 7(Ljava/lang/String;)Lde/tsl2/nano/core/http/HttpClient; java/net/URL
(Ljava/lang/String;)V
openConnection ()Ljava/net/URLConnection; ! java/net/HttpURLConnection # $ % http Ljava/net/HttpURLConnection; ' java/lang/Exception
) * + , - "de/tsl2/nano/core/ManagedException forward ,(Ljava/lang/Throwable;)Ljava/lang/Throwable;
/ 0 1 get )(Ljava/lang/String;)Ljava/io/InputStream; 3 java/lang/String
5 6 7 read :(Ljava/io/InputStream;Ljava/lang/Class;)Ljava/lang/Object;
9 : ; setRequestProperty '(Ljava/lang/String;Ljava/lang/String;)V
= > ? setReadTimeout (I)V A GET
C D E send =(Ljava/lang/String;Ljava/lang/String;[B)Ljava/io/InputStream;
G H setRequestMethod J Content-Type L POST
2 N O P equals (Ljava/lang/Object;)Z R PUT
T U V setDoOutput (Z)V
X Y ? setFixedLengthStreamingMode
[ \ ] getOutputStream ()Ljava/io/OutputStream;
_ ` a b c java/io/OutputStream write ([B)V
e f run
h i j response ()Ljava/io/InputStream;
l m j getInputStream o java/io/IOException
q r s t u de/tsl2/nano/core/util/ByteUtil toByteArray (Ljava/io/InputStream;)[B
w 6 u
q y z { toByteStream '([BLjava/lang/Class;)Ljava/lang/Object;
} ~ getDoOutput ()Z
_ ? ? flush
? ? ? getURL ()Ljava/net/URL; ? ? ? makeConcatWithConstants "(Ljava/net/URL;)Ljava/lang/String; ? ? ? ? ? org/apache/commons/logging/Log debug (Ljava/lang/Object;)V
? ? connect
? ? ? getResponseCode ()I ? ? ? (I)Ljava/lang/String; ? java/lang/IllegalStateException
? ? j getErrorStream ? UTF-8
2 ? ? ([BLjava/lang/String;)V ? ? ? &(Ljava/lang/String;)Ljava/lang/String; ? ? ? ? '(ILjava/lang/String;)Ljava/lang/String;
?
? ? ? toString ()Ljava/lang/String; ? java/lang/Runnable result Ljava/lang/Object; UTF8 Ljava/lang/String;
ConstantValue Code LineNumberTable LocalVariableTable this #Lde/tsl2/nano/core/http/HttpClient; wsUrl url Ljava/net/URL; e Ljava/lang/Exception;
StackMapTable getString I(Ljava/lang/String;Ljava/lang/String;)Lde/tsl2/nano/core/http/HttpClient; key value timeout I contenttype os Ljava/io/OutputStream; method data [B Ljava/io/IOException; in Ljava/io/InputStream; type Ljava/lang/Class; LocalVariableTypeTable Ljava/lang/Class; Signature F(Ljava/io/InputStream;Ljava/lang/Class;)TT; code
SourceFile HttpClient.java BootstrapMethods ?
? ? ? ? ? $java/lang/invoke/StringConcatFactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; ? sending request ? --> http-code: ? : ? Http InnerClasses ? %java/lang/invoke/MethodHandles$Lookup ? java/lang/invoke/MethodHandles Lookup ! ? $ % ? ? ? ? ? ?
? T *? *? ? *+? W? ? - !
. / ? ? ? ? ? ? ? ? Y+? M*,? ? ? "? M,? (W*? &