CodingAleCR / http_interceptor

A lightweight, simple plugin that allows you to intercept request and response objects and modify them if desired.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[WEB] Unsupported operation: Platform._version

BartusZak opened this issue · comments

HttpClientWithInterceptor _httpClient;
...
await _httpClient.get();

Result:
Unsupported operation: Platform._version

Flutter 1.26.0-17.3.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 4b50ca7f7f (8 days ago) • 2021-02-04 19:44:27 -0800       
Engine • revision 2c527d6c7e
Tools • Dart 2.12.0 (build 2.12.0-259.8.beta)

http_interceptor: ^0.3.3

Related to flutter/flutter#39998.

<getObject: NoSuchMethodError: The getter 'uri' was called on null.>
http_client_with_interceptor.dart

Are you by any chance using Flutter for Web?

Hey @CodingAleCR,

That's correct.

I was playing around with your library but at the end I had to user Dio.

It has interceptors and supports Web/Android and iOS.

I'm sorry for the confusion, I have not been able to take the time to add support for Web. I'm glad you found a solution for your problems and happy that you are using Flutter. Cheers from Costa Rica my friend! 🥳🥳

Let's leave that issue open then for others.

Pozdrowienia z Polski 👯‍♂️

This should be fixed as of 0.4.0, it's important that you guys know that the badCertificatesCallback and the findProxy features are not supported on Flutter Web due to browser limitations. Let me know if any other issues persist, also be aware of CORS as while testing I found some issues around it while querying public APIs.