I'm facing some strange issue when try to make an http post request through HttpClient and through http package and for both I receive:
[ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: HttpException: Connection closed before full header was received, uri = https://dumb.api.url/api/login
The strange thing is it works through postman, curl and if done natively on Android (Kotlin). Also, there is no VPN or whatever turned on.
I know there is a lot of similar questions, but none of them helped me.
I already tried using http package, HttpClient, ioClient, Dio to make a request. I also tried to set timeouts, use delays, using badCertificates callback, cleaning the project (flutter clean), restarting IDE and device and running this both on emulator and device.