1

how to fix status code 302 with flutter, this is my code

I used, headers and options: Options( followRedirects: false, validateStatus: (status) { return status! < 500; }, How can I overcome status code with Dio 302 in Flutter?

  • A 302 is a redirect. `followRedirects` should probably be true if you want to load the final destination. – ceejayoz May 18 '23 at 19:14
  • In my case, I sent a `POST` API request using `dio` package, which returned an error `302`. I issued an identical request using Postman, resulting in a successful response with a status code 200. However, when I attempted the same request in Flutter, it produced an error with a returned status code of 302. I already solved this problem, please check my comment here if you did not solve the problem yet: https://stackoverflow.com/a/76972916/16449728 – Mostafa Alazhariy Aug 24 '23 at 21:16

0 Answers0