de.tsl2.nano.core.http.EHttpClient.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)
???? =?
"de/tsl2/nano/core/http/EHttpClient (Ljava/lang/String;Z)V
!de/tsl2/nano/core/http/HttpClient (Ljava/lang/String;)V
useRESTSeparators Z
java/util/UUID
randomUUID ()Ljava/util/UUID;
toString ()Ljava/lang/String; makeConcatWithConstants &(Ljava/lang/String;)Ljava/lang/String; UTF-8
! " # $ % java/lang/String getBytes (Ljava/lang/String;)[B ( ) * http Ljava/net/HttpURLConnection; , Content-Type
/ 0 1 2 3 java/net/HttpURLConnection setRequestProperty '(Ljava/lang/String;Ljava/lang/String;)V
/ 5 6 7 setChunkedStreamingMode (I)V
/ 9 : ; getOutputStream ()Ljava/io/OutputStream;
= > ? data _(Ljava/io/OutputStream;Ljava/lang/String;Ljava/lang/String;)Lde/tsl2/nano/core/http/HttpClient; A java/io/InputStream
C > D t(Ljava/io/OutputStream;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/String;)Lde/tsl2/nano/core/http/HttpClient; F "java/lang/IllegalArgumentException H ,chunks must be of type String or InputStream
E
K L M N O java/io/OutputStream write ([B)V Q java/lang/Exception
S T U V W "de/tsl2/nano/core/ManagedException forward ,(Ljava/lang/Throwable;)Ljava/lang/Throwable;
Y Z [ \ ] java/net/URLEncoder encode 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; ` ]
b c d N e de/tsl2/nano/core/util/FileUtil /(Ljava/io/InputStream;Ljava/io/OutputStream;Z)J
K g N h ([BII)V
@ j k l read ([B)I n
p q r get 9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; t java/io/StringReader
s
w x y z { javax/json/Json createReader )(Ljava/io/Reader;)Ljavax/json/JsonReader; } ~ k ? javax/json/JsonReader ()Ljavax/json/JsonStructure;
? ? ? ? ? de/tsl2/nano/core/util/MapUtil asArray $(Ljava/util/Map;)[Ljava/lang/Object;
? ? ? getParameterSeparators ()[C
? q ? ;(Ljava/lang/String;[C[Ljava/lang/Object;)Ljava/lang/String; ? ? ? SEPARATORS_REST [C ? ? ? SEPARATORS_QUERY ? GET
? ? ? rest q(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[C[Ljava/lang/Object;)Ljava/lang/String;
/ ? ? ? getURL ()Ljava/net/URL;
? ? java/net/URL `
? ? ? parameter
? ? ? createHttpConnection 7(Ljava/lang/String;)Lde/tsl2/nano/core/http/HttpClient;
! ? $ ? ()[B
? ? ? send =(Ljava/lang/String;Ljava/lang/String;[B)Ljava/io/InputStream;
? k ? :(Ljava/io/InputStream;Ljava/lang/Class;)Ljava/lang/Object;
? ? ? ? asMap $([Ljava/lang/Object;)Ljava/util/Map; ? java/util/LinkedHashMap ? ? ? ? ?
java/util/Map size ()I
? ? 7 ? ? ? ? keySet ()Ljava/util/Set; ? ? ? ? ?
java/util/Set iterator ()Ljava/util/Iterator; ? ? ? ? ? java/util/Iterator hasNext ()Z ? ? ? ? next ()Ljava/lang/Object; ? ? q ? &(Ljava/lang/Object;)Ljava/lang/Object;
? ? java/lang/Object
Y ? \ ? ? ? ? put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; ? { ? }
? ? ? ? ? !de/tsl2/nano/core/util/StringUtil insertProperties Y(Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; ? java/lang/StringBuilder
? ? r path
?
! ? ? ? valueOf (C)Ljava/lang/String;
! ? ? ? endsWith (Ljava/lang/String;)Z ? ? '(CLjava/lang/String;)Ljava/lang/String;
? ? ? indexOf (Ljava/lang/String;)I
? java/lang/Character (C)Ljava/lang/Character;
?
&(Ljava/lang/Object;)Ljava/lang/String;
<(Ljava/io/Serializable;Ljava/lang/String;)Ljava/lang/String;
? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; $java/io/UnsupportedEncodingException
?
! contains (Ljava/lang/CharSequence;)Z java/lang/IllegalStateException
run ()V
"#$%& de/tsl2/nano/core/log/LogFactory getLog 3(Ljava/lang/Class;)Lorg/apache/commons/logging/Log; ()* LOG Lorg/apache/commons/logging/Log; Code LineNumberTable LocalVariableTable this $Lde/tsl2/nano/core/http/EHttpClient; wsUrl Ljava/lang/String;
multipartData 8([Ljava/lang/Object;)Lde/tsl2/nano/core/http/HttpClient; i I boundary
boundaryBytes [B finishBoundaryBytes out Ljava/io/OutputStream; e Ljava/lang/Exception; chunks [Ljava/lang/Object;
StackMapTable?8 o name value n buffer in Ljava/io/InputStream; fileName restJSON A(Ljava/lang/String;[Ljava/lang/Object;)Ljavax/json/JsonStructure; url args jsonStr 5(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/String; Ljava/util/Map; rest_ ?
separators o(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; method contenttype v Ljava/lang/Object; k map margs :(Ljava/lang/String;Z[Ljava/lang/Object;)Ljava/lang/String; &Ljava/io/UnsupportedEncodingException; c C buf Ljava/lang/StringBuilder;d java/io/Serializable
SourceFile EHttpClient.java BootstrapMethodsj
klm n $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;p --
r ----t .multipart/form-data; charset=UTF-8; boundary=v ,Content-Disposition: form-data; name=""
x :Content-Disposition: form-data; name=""; filename=""
z | variables not filled: InnerClasses %java/lang/invoke/MethodHandles$Lookup? java/lang/invoke/MethodHandles Lookup ! )* ? ? ? ? + ? *+? ? ,
2 3- ./ 01 + Q *+? *? ? , : ;
<- ./ 01 ?23 + ? Ӹ ? M,? ? N,? &