Commit 315defa41f938ab0d4911a470f5aaace2d7102b3

Authored by wdn127929
1 parent 68913890

dio

Showing 1 changed file with 2 additions and 1 deletions
@@ -342,6 +342,7 @@ class DioUtil { @@ -342,6 +342,7 @@ class DioUtil {
342 options = new Options(); 342 options = new Options();
343 } 343 }
344 options.method = method; 344 options.method = method;
  345 + options.contentType = Headers.formUrlEncodedContentType;
345 return options; 346 return options;
346 } 347 }
347 348
@@ -417,7 +418,7 @@ class DioUtil { @@ -417,7 +418,7 @@ class DioUtil {
417 /// get Def Options. 418 /// get Def Options.
418 static BaseOptions getDefOptions() { 419 static BaseOptions getDefOptions() {
419 BaseOptions options = new BaseOptions(); 420 BaseOptions options = new BaseOptions();
420 - // options.contentType = Headers.formUrlEncodedContentType; 421 + options.contentType = Headers.formUrlEncodedContentType;
421 options.connectTimeout = 1000 * 10; //默认10s 422 options.connectTimeout = 1000 * 10; //默认10s
422 options.receiveTimeout = 1000 * 10; //默认10s 423 options.receiveTimeout = 1000 * 10; //默认10s
423 return options; 424 return options;