title: JavaScript client for SpringWebFlux to POST data
body: <p>I am playing around with Spring WebFlux to get a taste for reactive API's , however I am struggling to find a solution to "POST" data to a WebFlux endpoint from the JavaScript EventSource API . </p>
  
  <p>My endpoint looks like this :</p>
  
  <pre><code>@PostMapping(value="/start/{id}", produces = MediaType.TEXT_EVENT_STREAM_VALUE , consumes=MediaType.APPLICATION_JSON_VALUE)
  public Flux&lt;Integer&gt; startProcessing(@PathVariable("id") Long id, @RequestBody ProcessDetails process)
  </code></pre>
  
  <p>And I am easily able to hit the endpoint using POSTMAN , but the JavaScript EventSource api used to get an eventSource is not allowing to send a POST body . The request sent is always a GET request.</p>
  
  <pre><code>&lt;script&gt;    
  var source = new EventSource("/start/34");
  ...
  </code></pre>
  
  <p>How can I POST content to a WebFlux endpoint from the browser?</p>