7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/dev_suite/request_builder/tool/curl.rb', line 7
def build_command(http_method:, url:, headers:, body: nil)
validate_parameters(http_method, url, , body)
command = build_base_command(http_method, url)
(command, )
add_body(command, body)
add_insecure_option(command)
add_verbose_option(command)
add_follow_redirects_option(command)
add_cookie_option(command)
add_user_agent_option(command)
add_max_time_option(command)
add_connect_timeout_option(command)
command.join(" ").strip
end
|