Open marcinjahn opened 1 week ago
I also thought about implementing this as the default, but then it would break the "copy as curl" feature somehow.
Still, you'd be able to run the command, but you can't simply use this feature e.g. for sending the curl command to team mates :shrug:
Hmm, but what happens right now when you have the “big file” annotation added and then try to copy as curl?
Hmm, but what happens right now when you have the “big file” annotation added and then try to copy as curl?
copy as curl will copy a command which works only on your local machine, when the big file notation is active.
But that is opt-in and not the default, so for the default requests, the copy as curl copies a handy command which you can simply give to team-mate and it'll simply work.
So let's see how we can implement this in a way that won't break stuff for users :)
Hmm, but are you able to find out that the temp file thing is necessary prior to sending the request? If so, maybe you could just show a warning notification when copying curl telling users that the curl will only work locally or something.
Hmm, but are you able to find out that the temp file thing is necessary prior to sending the request? If so, maybe you could just show a warning notification when copying curl telling users that the curl will only work locally or something.
Probably we can, but I need some time for investigation, because it seems to be dependant on the OS and I need a cross-platform way that works for querying the information on how long the arguments string can be.
I don’t think there is a dynamic way to retrieve that info, furthermore it depends how libuv (when using vim.system) handles the arguments / processes on each system (e.g. escaping/quoting). On Linux there were made changes for the complete command line length, the single argument length between builds (2.6.23 vs 2.6.x). I think there could be only a config variable like max_body_len_for_args which could be set by a guessed value for Unix/Windows and overwritten by the user
The page https://kulala.mwco.app/docs/usage/huge-request-body mentions that one has to manually add some annotation to have huge request body working. I think it'd be much more user-friendly if kulala would just use the temp file automatically whenever it's needed.