commit 90a4120fdd5aec777110be3dc2c23d746df3068b
parent ba00a2e3ebb5fc9dd6922894200981ae4902c5af
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Thu, 22 Oct 2020 00:24:45 +0200
vim: rename ruby snippets
Former-commit-id: c3f3b97eb0cff760a31c85424529ab67ba263ae5
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vim/ultisnips/ruby.snippets b/vim/ultisnips/ruby.snippets
@@ -1,4 +1,4 @@
-snippet request_post "Post request with Net::HTTP" b
+snippet http_post "Post request with Net::HTTP" b
headers = {'X-Accept' => 'application/json', 'Accept' => 'application/json', 'Content-Type' => 'application/json; charset=UTF8'}
data = {${1:param_1}: ${2:value_1}}
response = Net::HTTP.post URI(${3:destination url}), data.to_json, headers
@@ -9,7 +9,7 @@ else
end
endsnippet
-snippet request_get "Get request with open-uri" b
+snippet http_get "Get request with open-uri" b
headers = {'Accept' => 'application/json'}
response = URI.open(${1:url}, headers)
body = JSON.parse(response.read)