lib/grape-slate/example_generator/shell.rb in grape-slate-0.0.2 vs lib/grape-slate/example_generator/shell.rb in grape-slate-0.0.3
- old
+ new
@@ -42,9 +42,11 @@
"--request #{method}"
end
def data
+ return unless %w(POST PUT).include?(method)
+
"--data '#{resource.sample_request(false)}'"
end
def headers
request_headers.map { |header| "--header '#{header.first.join(': ')}'" }