You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realized with #202 that shows the curl command used that < {{TEST_DATA_FOLDER}}/payloads/v2/model.json translates to --data-raw HUGE STRING instead of referencing a file. I am not sure if that's a plenary fault and if we can fix that on our side.
I dont know either if this should be configurable (on a per-request basis for instance) but for my scenarios I would rather have the curl command reference the file on the filesystem with curl --data-raw @file.txt rather than curl --data-raw <INLINED FILE.TXT>
The text was updated successfully, but these errors were encountered:
after looking into lua/rest-nvim/request/init.lua , seems like it's our fault: we load the file in memory to be able to replace variables but never write the generated result back.
In a way it would be nice to distinguish between files where we want to replace values and files we dont need to. This could speed up request. This can be done in several ways:
do the replacing just for json ? it looks ok to me but it's a breaking change plus it may make sense for some other format like .txt. Maybe we should limit the replacing for textual formats aka json/etc
make it controllable via a new symbol aka << instead of < or <readonly to mark that it's not a template file ?
NB: if we do change the format, it could be interesting to follow hurl's format #195 but seems like they dont have the templating feature of rest.nvim so it doesn't make sense yet.
not tested much but here is an implem #216 : if you reference a file via <@ file instead of < file the filename will be passed as is to curl, thus making the curl command a ton shorter
I realized with #202 that shows the curl command used that
< {{TEST_DATA_FOLDER}}/payloads/v2/model.json
translates to--data-raw HUGE STRING
instead of referencing a file. I am not sure if that's a plenary fault and if we can fix that on our side.I dont know either if this should be configurable (on a per-request basis for instance) but for my scenarios I would rather have the curl command reference the file on the filesystem with
curl --data-raw @file.txt
rather thancurl --data-raw <INLINED FILE.TXT>
The text was updated successfully, but these errors were encountered: