flutterhttpflutter-webtwitch-api

How to listen and handle POST requests in a Flutter app


I want to use the Twitch API in a web app made in Flutter. When I POST a request, the Twitch server responds by POSTing a request to a callback URL.

I searched the internet, but I couldn't find a way to receive and handle POST request from servers. The Flutter documentation only explains how to do POST requests but not how to receive them.


Solution

  • You can't turn your flutter app into a server which is always online. You can do what you desire by creating an API endpoint, which is always online[server].

    Unless you can figure out a way, to keep your app exposed [i.e to have an ip address which is always accessable, from anyone online, which is something I'm sure you don't want.