Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support http-request with multipart/form-data. #61

Open
loganjeon opened this issue Nov 24, 2021 · 0 comments
Open

Support http-request with multipart/form-data. #61

loganjeon opened this issue Nov 24, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@loganjeon
Copy link

loganjeon commented Nov 24, 2021

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’.

@ghost ghost added the enhancement New feature or request label Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant