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

Payload for POST method #3

Open
Olgoetz opened this issue Feb 3, 2022 · 2 comments
Open

Payload for POST method #3

Olgoetz opened this issue Feb 3, 2022 · 2 comments

Comments

@Olgoetz
Copy link

Olgoetz commented Feb 3, 2022

Hi,

Is it possible to add a "payload" property to add data when using e.g. POST as http method?

@anschoewe
Copy link
Owner

Ah... so right now this provider really only works with query string params... but for a POST you probably need to set a body. makes sense. Do you care much about the name? I would maybe vote for 'body' vs 'payload', but I'm open to suggestions. I don't yet know how soon I'll be able to work on this... just an FYI

@marcofranssen
Copy link

I would suggest to mimmick the CLI.

$ curl --help
Usage: curl [options...] <url>
 -d, --data <data>   HTTP POST data
 -f, --fail          Fail silently (no output at all) on HTTP errors
 -h, --help <category>  Get help for commands
 -i, --include       Include protocol response headers in the output
 -o, --output <file>  Write to file instead of stdout
 -O, --remote-name   Write output to a file named as the remote file
 -s, --silent        Silent mode
 -T, --upload-file <file>  Transfer local FILE to destination
 -u, --user <user:password>  Server user and password
 -A, --user-agent <name>  Send User-Agent <name> to server
 -v, --verbose       Make the operation more talkative
 -V, --version       Show version number and quit

This is not the full help, this menu is stripped into categories.
Use "--help category" to get an overview of all categories.
For all options use the manual or "--help all".

So data as a variable.

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