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

Does awscurl not support fetching POST data from a json file? #121

Open
jumpman07 opened this issue Jun 27, 2021 · 2 comments
Open

Does awscurl not support fetching POST data from a json file? #121

jumpman07 opened this issue Jun 27, 2021 · 2 comments

Comments

@jumpman07
Copy link

Hi All,

I am trying to make a request to my API hosted on Amazon API Gateway. I put the request object in a file called request.json and am attempting to make a POST request as follows:

awscurl -v --service execute-api -X POST -d @"bin/request.json" "${endpoint}adduser"

Since I have enabled the verbose flag, I am seeing data field of my request as 'data': '@bin/request.json' . Any help is appreciated.

@okigan
Copy link
Owner

okigan commented Jul 2, 2021

@jumpman07 that should work, relevant code is here: https://github.com/okigan/awscurl/blob/master/awscurl/awscurl.py#L453

so check that the file exists and your path to is correct (i.e. the "bin/request.json", should that be "./bin/request.json" ? )

@KenanHH
Copy link

KenanHH commented Jan 31, 2024

+1

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

3 participants