aws / aws/aws-lambda-runtime-interface-emulator
Support http-request with multipart/form-data.
- 主要言語
- Go
- スター
- 1.1k
- フォーク
- 118
- 平均マージ
- 42分
- マージ済み PR(30日)
- 2
説明
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’.
コントリビューションガイド
調査の方向性
/2015-03-31/functions/function/invocations に対して、issue の curl --form の例を使ってリクエストを再現することから始め、動作する JSON リクエストと比較します。そのエンドポイントからエミュレーターのリクエスト処理を追跡します。messages または files を含む multipart/form-data リクエストが UTF-8 unmarshal エラーなしで受け付けられれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- go
- 領域
- api, backend
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100