Created
March 9, 2021 09:00
-
-
Save dafinoer/b597ad9e1671246df7ee81870daf3cc7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void _setupChopper() { | |
final httpx = HttpClient(); | |
httpx.findProxy = (url) => 'PROXY <ip_address_from_postman>:9090'; | |
httpx.badCertificateCallback = | |
(X509Certificate cert, String host, int port) => true; | |
_client = ChopperClient( | |
converter: JsonConverter(), | |
baseUrl: baseurl, | |
client: http.IOClient(httpx), | |
interceptors: [HttpLoggingInterceptor(), _requestIntercept], | |
services: [ | |
SessionServices.create(), | |
AuthServices.create(), | |
UserServices.create(), | |
PayrollServices.create() | |
], | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment