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

Plans to add multipart requests support? #2

Open
Envek opened this issue Feb 1, 2021 · 1 comment
Open

Plans to add multipart requests support? #2

Envek opened this issue Feb 1, 2021 · 1 comment

Comments

@Envek
Copy link

Envek commented Feb 1, 2021

What do you think about adding multipart/form-data requests that are made with -F option in curl?

It would be awesome for testing endpoints for file uploads that are located on API Gateways with AWS Auth enabled.

Example [aws]curl command:

awscurl \
        -X POST \
        -H "Content-Type: multipart/form-data" \
        -F "field1=value1" \
        -F 'field2={"some":"json"};type=application/json' \
        -F "file=@/path/to/some/picture.png" \
        https://redacted.execute-api.us-west-2.amazonaws.com/path

Expected request body:

--------------------------d9afcbc8f3fe869a
Content-Disposition: form-data; name="field1"

value1
--------------------------d9afcbc8f3fe869a
Content-Disposition: form-data; name="field2"
Content-Type: application/json

{"some":"json"}
--------------------------d9afcbc8f3fe869a
Content-Disposition: form-data; name="file"; filename="picture.png"
Content-Type: image/png

<binary data>
--------------------------d9afcbc8f3fe869a--
@legal90
Copy link
Owner

legal90 commented Feb 1, 2021

Hi @Envek ,
That looks interesting, but I don't have a good knowledge of this part of curl. I also don't have a platform for testing multipart/form-data.

But the project is always open for contributions, so I would be glad to review the Pull-Request implementing this feature 👍 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants