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:
parent
dde6ec50ff
commit
ddfc5ea4b9
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ OptionParser.new do |o|
|
||||||
"--data [BODY]",
|
"--data [BODY]",
|
||||||
"Data to put in request body (prefix with '@' for file)") do |d|
|
"Data to put in request body (prefix with '@' for file)") do |d|
|
||||||
if d =~ /^@/
|
if d =~ /^@/
|
||||||
opts[:data] = open(d).read
|
opts[:data] = open(d[1..-1]).read
|
||||||
else
|
else
|
||||||
opts[:data] = d
|
opts[:data] = d
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue