stevenroose / dart-eventsource

A client and server implementation of Server-Side Events.
MIT License
56 stars 52 forks source link

POST not working #34

Open meulencv opened 1 year ago

meulencv commented 1 year ago

Hello, I'm having problems using the post. I have tried on web

 [...]

 Map body = {
        'text': message.text,
        'apikey': APIKEY,
      };

      EventSource eventSource = await EventSource.connect(
          "myserverurl.com", client: new BrowserClient(),
          body: jsonEncode(body));
      // listen for events
      eventSource.listen((Event event) async {

     [...]

My server is not receiving the post variables Hopefully it can be fixed Thanks :)

Aluomolo commented 7 months ago

It might be that in the browser environment, HTTP GET requests cannot carry a body.