aws / aws/aws-lambda-runtime-interface-emulator
Support http-request with multipart/form-data.
- Vorherrschende Sprache
- Go
- Sterne
- 1.1k
- Forks
- 118
- Ø Merge
- 42 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
When sending http-request using curl or postman with content-type as ‘application/json’, it is working well.
`curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{[body with json]}'`
But with content-type as ‘multipart/form-data’, it is not working with error about “unmarshal input : ‘utf-8’”
`curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" --form '[some message or file]'`
Error log
`START RequestId: 869477bd-4c63-4d81-802c-416e9634067b Version: $LATEST
Traceback (most recent call last):able to unmarshal input: 'utf-8' codec can't decode byte 0xb9 in position 451: invalid start byte
END RequestId: 869477bd-4c63-4d81-802c-416e9634067b
REPORT RequestId: 869477bd-4c63-4d81-802c-416e9634067b Duration: 20.28 ms Billed Duration: 100 ms Memory Size: 3008 MB Max Memory Used: 3008 MB`
It need to support content-type as ‘multipart/form-data’. I wonder it is possible or only support ‘application/json’.
Beitragsleitfaden
Rechercherichtung
Beginne damit, die Anfrage gegen /2015-03-31/functions/function/invocations unter Verwendung des curl --form-Beispiels im Issue zu reproduzieren, und vergleiche sie mit der funktionierenden JSON-Anfrage. Verfolge die Anfrageverarbeitung des Emulators ab diesem Endpoint; fertig ist die Aufgabe, wenn multipart/form-data-Anfragen mit messages oder files ohne den UTF-8-unmarshal-Fehler akzeptiert werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- go
- Bereich
- api, backend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100