Comments (4)
好像支持
var dio = new Dio();
dio.onHttpClientCreate
from dio.
@fly512
这个方法 我当时来看的话 是在内部创建好了以后,你可以获取到httpclient对象,修改参数
而我开始说了httpClient的自签名必须要在构造方法中传参,而dio中httpclient都是new出来的,没有提供自己注入httpclient的方案,所以我才会提这个issue,
from dio.
已支持,先升级到>=0.1.2,如文档示例:
dio.onHttpClientCreate = (HttpClient client) {
// you can also create a new HttpClient to dio
// return new HttpClient();
};
from dio.
如何在dio 2.x中实现?
from dio.
Related Issues (20)
- Access response data type <T> in Interceptor. HOT 5
- SOCKS5 PROXY SUPPORT HOT 1
- Dio on Windows : Invalid media type: expected no more input. HOT 3
- I cannot set a content-type of a form-data field HOT 5
- DioException (DioException [bad response]: This exception was thrown because the response has a status code of 401 and RequestOptions.validateStatus was configured to throw for this status code. HOT 3
- The connection errored: Connection refused This indicates an error which most likely cannot be solved by the library. HOT 2
- [Web] ERROR_TYPE: DioExceptionType.connectionError HOT 2
- Flutter web deployment HOT 1
- [Dio native adapter] proxy HOT 2
- Exception has occurred. DioException (DioException [bad response]: This exception was thrown because the response has a status code of 401 and RequestOptions.validateStatus was configured to throw for this status code. The status code of 401 has the following meaning: "Client error - the request contains bad syntax or cannot be fulfilled" Read more about status codes at https://developer.mozilla.org/en-US/docs/Web/HTTP/Status In order to resolve this exception you typically have either to verify and fix your request code or you have to fix the server code. ) HOT 1
- error 404 when trying to download a file. HOT 3
- How to mock Dio.interceptors.add when write unit test? HOT 1
- Conditionally allows relative path for `baseUrl` HOT 11
- Need a way to catch DioException [request cancelled] from the caller code HOT 3
- 有没有大佬帮我看看我的代码有什么问题,handler.resolve(res) 后,原始请求返回值一直为空,不知道为什么? HOT 1
- I don't know where the problem is with my code. After handler.reslove(res), the return value of the original request is always empty. HOT 3
- [Flutter Web] dio.get() sends options. HOT 1
- How to use handler.reject in onError of QueuedInterceptor HOT 1
- [native_dio_adapter] Exception fetching LoggerImpl class HOT 4
- http请求头不标准,大小写全部错误 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dio.