@@ -93,7 +93,8 @@ def parse_args(args, type = 'http')
93
93
end
94
94
end
95
95
96
- # Parse the provided arguments for making HTTPS requests.
96
+ # Parse the provided arguments for making HTTPS requests. The argument flags
97
+ # are intended to be similar to the curl utility.
97
98
#
98
99
# @param args [Array<String>] The command line arguments to parse.
99
100
# @param type [String] The protocol type that the request is for.
@@ -104,7 +105,8 @@ def parse_args_https(args = [], type = 'https')
104
105
parse_args_http ( args , type )
105
106
end
106
107
107
- # Parse the provided arguments for making HTTP requests.
108
+ # Parse the provided arguments for making HTTP requests. The argument flags
109
+ # are intended to be similar to the curl utility.
108
110
#
109
111
# @param args [Array<String>] The command line arguments to parse.
110
112
# @param type [String] The protocol type that the request is for.
@@ -209,6 +211,7 @@ def parse_args_http(args = [], type = 'http')
209
211
# @option opts [Hash] :headers A hash of additional headers to include in
210
212
# the request.
211
213
# @option opts [String] :method The HTTP method to use in the request.
214
+ # @option opts [#write] :output_file A file to write the response data to.
212
215
# @option opts [Boolean] :print_body Whether or not to print the body of the
213
216
# response.
214
217
# @option opts [Boolean] :print_headers Whether or not to print the headers
@@ -239,6 +242,7 @@ def handle_request_https(opts, opt_parser)
239
242
# @option opts [Hash] :headers A hash of additional headers to include in
240
243
# the request.
241
244
# @option opts [String] :method The HTTP method to use in the request.
245
+ # @option opts [#write] :output_file A file to write the response data to.
242
246
# @option opts [Boolean] :print_body Whether or not to print the body of the
243
247
# response.
244
248
# @option opts [Boolean] :print_headers Whether or not to print the headers
@@ -314,7 +318,9 @@ def handle_request_http(opts, opt_parser)
314
318
# Output lines based on the provided options. Data is either printed to the
315
319
# console or written to a file. Trailing new lines are removed.
316
320
#
317
- # @param opts [Array<Symbol>] The options as parsed from the command line.
321
+ # @param opts [Hash] The options as parsed from parse_args.
322
+ # @option opts [#write, nil] :output_file An optional file to write the
323
+ # output to.
318
324
# @param line [String] The string to output.
319
325
# @return [nil]
320
326
def output_line ( opts , line )
0 commit comments