2323 */
2424package org .aoju .bus .http ;
2525
26+ import org .aoju .bus .core .consts .Charset ;
2627import org .aoju .bus .core .consts .Httpd ;
2728import org .aoju .bus .core .consts .MediaType ;
2829import org .aoju .bus .core .lang .exception .InstrumentException ;
@@ -227,7 +228,7 @@ public HttpClient(final Dns dns,
227228 * @return String
228229 */
229230 public static String get (final String url ) {
230- return get (url , org . aoju . bus . core . consts . Charset .DEFAULT_UTF_8 );
231+ return get (url , Charset .DEFAULT_UTF_8 );
231232 }
232233
233234 /**
@@ -263,7 +264,7 @@ public static String get(final String url, final boolean isAsync) {
263264 * @return String
264265 */
265266 public static String get (final String url , final Map <String , Object > queryMap ) {
266- return get (url , queryMap , null , org . aoju . bus . core . consts . Charset .DEFAULT_UTF_8 );
267+ return get (url , queryMap , null , Charset .DEFAULT_UTF_8 );
267268 }
268269
269270 /**
@@ -275,7 +276,7 @@ public static String get(final String url, final Map<String, Object> queryMap) {
275276 * @return String
276277 */
277278 public static String get (final String url , final Map <String , Object > queryMap , Map <String , String > headerMap ) {
278- return get (url , queryMap , headerMap , org . aoju . bus . core . consts . Charset .DEFAULT_UTF_8 );
279+ return get (url , queryMap , headerMap , Charset .DEFAULT_UTF_8 );
279280 }
280281
281282 /**
@@ -364,7 +365,7 @@ public static String post(final String url, final Map<String, Object> formMap) {
364365 */
365366 public static String post (final String url , final String data ,
366367 final String mediaType ) {
367- return post (url , data , mediaType , org . aoju . bus . core . consts . Charset .DEFAULT_UTF_8 );
368+ return post (url , data , mediaType , Charset .DEFAULT_UTF_8 );
368369 }
369370
370371 /**
@@ -392,7 +393,7 @@ public static String post(final String url, final String data, final String medi
392393 */
393394 public static String post (final String url , final Map <String , Object > queryMap ,
394395 final String mediaType ) {
395- return post (url , queryMap , mediaType , org . aoju . bus . core . consts . Charset .DEFAULT_UTF_8 );
396+ return post (url , queryMap , mediaType , Charset .DEFAULT_UTF_8 );
396397 }
397398
398399 /**
@@ -405,7 +406,7 @@ public static String post(final String url, final Map<String, Object> queryMap,
405406 */
406407 public static String post (final String url , final Map <String , Object > queryMap ,
407408 final Map <String , String > headerMap ) {
408- return post (url , queryMap , headerMap , org . aoju . bus . core . consts . Charset . DEFAULT_UTF_8 );
409+ return post (url , queryMap , headerMap , MediaType . APPLICATION_FORM_URLENCODED );
409410 }
410411
411412 /**
@@ -434,7 +435,7 @@ public static String post(final String url, final Map<String, Object> queryMap,
434435 */
435436 public static String post (final String url , final Map <String , Object > queryMap ,
436437 final Map <String , String > headerMap , final String mediaType ) {
437- return post (url , queryMap , headerMap , mediaType , org . aoju . bus . core . consts . Charset .DEFAULT_UTF_8 );
438+ return post (url , queryMap , headerMap , mediaType , Charset .DEFAULT_UTF_8 );
438439 }
439440
440441 /**
@@ -464,7 +465,7 @@ public static String post(final String url, final Map<String, Object> queryMap,
464465 */
465466 public static String post (final String url , final Map <String , Object > params ,
466467 final List <String > pathList ) {
467- MediaType mediaType = MediaType .valueOf (MediaType .APPLICATION_FORM_URLENCODED + ";" + org . aoju . bus . core . consts . Charset .DEFAULT_UTF_8 );
468+ MediaType mediaType = MediaType .valueOf (MediaType .APPLICATION_FORM_URLENCODED + ";" + Charset .DEFAULT_UTF_8 );
468469 RequestBody bodyParams = RequestBody .create (mediaType , params .toString ());
469470 MultipartBody .Builder requestBodyBuilder = new MultipartBody .Builder ().setType (MediaType .MULTIPART_FORM_DATA_TYPE )
470471 .addFormDataPart ("params" , "" , bodyParams );
@@ -482,7 +483,7 @@ public static String post(final String url, final Map<String, Object> params,
482483 if (response .isSuccessful ()) {
483484 assert response .body () != null ;
484485 byte [] bytes = response .body ().bytes ();
485- result = new String (bytes , org . aoju . bus . core . consts . Charset .DEFAULT_UTF_8 );
486+ result = new String (bytes , Charset .DEFAULT_UTF_8 );
486487 }
487488 } catch (Exception e ) {
488489 Logger .error (">>>>>>>>error requesting HTTP upload file form request<<<<<<<<" , e );
@@ -498,10 +499,10 @@ public static String post(final String url, final Map<String, Object> params,
498499 */
499500 private static String execute (final Builder builder ) {
500501 if (StringUtils .isBlank (builder .requestCharset )) {
501- builder .requestCharset = org . aoju . bus . core . consts . Charset .DEFAULT_UTF_8 ;
502+ builder .requestCharset = Charset .DEFAULT_UTF_8 ;
502503 }
503504 if (StringUtils .isBlank (builder .responseCharset )) {
504- builder .responseCharset = org . aoju . bus . core . consts . Charset .DEFAULT_UTF_8 ;
505+ builder .responseCharset = Charset .DEFAULT_UTF_8 ;
505506 }
506507 if (StringUtils .isBlank (builder .method )) {
507508 builder .method = Httpd .GET ;
@@ -562,10 +563,10 @@ private static String execute(final Builder builder) {
562563 */
563564 private static String enqueue (final Builder builder ) {
564565 if (StringUtils .isBlank (builder .requestCharset )) {
565- builder .requestCharset = org . aoju . bus . core . consts . Charset .DEFAULT_UTF_8 ;
566+ builder .requestCharset = Charset .DEFAULT_UTF_8 ;
566567 }
567568 if (StringUtils .isBlank (builder .responseCharset )) {
568- builder .responseCharset = org . aoju . bus . core . consts . Charset .DEFAULT_UTF_8 ;
569+ builder .responseCharset = Charset .DEFAULT_UTF_8 ;
569570 }
570571 if (StringUtils .isBlank (builder .method )) {
571572 builder .method = Httpd .GET ;
0 commit comments