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

Allow additional arguments to curl? #4

Open
titaniumbones opened this issue Nov 4, 2021 · 2 comments
Open

Allow additional arguments to curl? #4

titaniumbones opened this issue Nov 4, 2021 · 2 comments

Comments

@titaniumbones
Copy link

I'd like to use plz to upload files to an authorized endpoint. That endpoint requires the file and various dynamically-assigned parameters to be passed as multipart form data. In curl this is achieved with command-line arguments like:

curl '<upload_url>' \
     -F 'key=/users/1234/files/profile_pic.jpg' \
     <any other parameters specified in the upload_params response>
     -F 'file=@my_local_file.jpg'

How would you feel about allowing an additional parameter :additional-cli-args (or something) that gets added to curl-command-line-args, or maybe just replaces plz-curl-default-args? This would allow me to use plz for such requests. What do you think?

@alphapapa
Copy link
Owner

Hi Matt,

We could add such a variable if necessary, but I think you can just bind plz-curl-default-args to whatever value you need before calling plz to accomplish the same thing. AFAIK it should work, unless there's some kind of conflict in argument order. Please try it and let me know if it works.

@alphapapa
Copy link
Owner

By the way, for the use case you present, ideally there would be no need for the user to specify additional arguments for curl--rather, it should all be doable with plz's own API. So if you'd like, we could talk further about how to implement that according to your needs.

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

No branches or pull requests

2 participants