1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00

Fixed reading file content to request body data

Signed-off-by: sandro turriate <sandro.turriate@gmail.com>
This commit is contained in:
Vesa Nieminen 2009-08-27 18:32:18 +08:00 committed by sandro turriate
parent dde6ec50ff
commit ddfc5ea4b9

View file

@ -37,7 +37,7 @@ OptionParser.new do |o|
"--data [BODY]",
"Data to put in request body (prefix with '@' for file)") do |d|
if d =~ /^@/
opts[:data] = open(d).read
opts[:data] = open(d[1..-1]).read
else
opts[:data] = d
end