browserify / browserify/http-browserify

Support `FormData`

Offen
#20 8 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
245
Forks
104
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Posting FormData can be done using something like:

``` js
var fd = new FormData()
fd.append('image', file)
var req = new XMLHttpRequest()
req.onload = function () {
callback(null, req.responseText)
}
req.onerror = callback
req.open('post', 'https://api.imgur.com:443/3/image.json')
req.setRequestHeader('Authorization', 'Client-ID ' + clientID)
req.send(fd)
```

However, I can see know way of handling `FormData` using the built in `http` module.

(see https://github.com/substack/node-browserify/issues/439)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start by reading the built-in http module's request and body-handling entry points, then compare them with the FormData and XMLHttpRequest example in the issue. Done should mean FormData can be posted through the module while existing request behavior continues to work; the issue does not name a file or test to run.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
web-dev
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.