aws / aws/aws-lambda-runtime-interface-emulator
Support http-request with multipart/form-data.
- Lingua principale
- Go
- Stelle
- 1.1k
- Fork
- 118
- Merge medio
- 42m
- PR unite (30g)
- 2
Descrizione
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’.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo la richiesta verso /2015-03-31/functions/function/invocations usando l'esempio curl --form nell'issue e confrontala con la richiesta JSON funzionante. Traccia la gestione delle richieste dell'emulatore a partire da quell'endpoint; il lavoro è completato quando le richieste multipart/form-data contenenti messages o files vengono accettate senza l'errore di unmarshalling UTF-8.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- go
- Ambito
- api, backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100