The issue/bug was described in oakserver/oak#400
To check how FormData works fine in Deno, use deno run ./DenoServer.js
and open localhost:8000 in the browser. It will show the response parsed as FormData correctly.
Instead, deno run ./OakServer.js
sends the FormData, but for some reason web browsers can't parse it as FormData. Firefox logs the error: TypeError: Could not parse content as FormData
and in Chrome says: TypeError: Invalid MIME type
.
In any case, curl -X POST http://localhost:8000/formData
will retrieve the FormData using ./DenoServer
, and also ./OakServer.js
.