Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug in curl and httpie output builders #298

Merged
merged 1 commit into from
May 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/output_builder/curl.cr
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ class OutputBuilderCurl < OutputBuilder
if baked[:body_type] == "json"
cmd += " -H \"Content-Type:application/json\""
end
end

baked[:header].each do |header|
cmd += " -H \"#{header}\""
end
baked[:header].each do |header|
cmd += " -H \"#{header}\""
end

baked[:cookie].each do |cookie|
cmd += " --cookie \"#{cookie}\""
end
baked[:cookie].each do |cookie|
cmd += " --cookie \"#{cookie}\""
end

ob_puts cmd
Expand Down
13 changes: 7 additions & 6 deletions src/output_builder/httpie.cr.cr
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ class OutputBuilderHttpie < OutputBuilder
if baked[:body_type] == "json"
cmd += " \"Content-Type:application/json\""
end
baked[:header].each do |header|
cmd += " \"#{header}\""
end
end

baked[:cookie].each do |cookie|
cmd += " \"Cookie: #{cookie}\""
end
baked[:header].each do |header|
cmd += " \"#{header}\""
end

baked[:cookie].each do |cookie|
cmd += " \"Cookie: #{cookie}\""
end

ob_puts cmd
Expand Down
Loading