Write curl body to a temporary JSON file #673
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #672
Should have the same effect as #622, but cross-platform since this uses a tempname() provided by neovim instead.
(Somewhat surprising to me: the plenary curl wrapper checks whether the content of
body
is a file, and if so, it prepends@
telling curl to read the file contents. See: https://github.com/nvim-lua/plenary.nvim/blob/2d9b06177a975543726ce5c73fca176cedbffe9d/lua/plenary/curl.lua#L205)I don't think you'd want to put the logic at the provider, since you'll have to repeat it for every provider. This will work for all providers since it's just calling curl in a slightly different way.