From ddfc5ea4b9c4097b02fbad34313e90011fcc7eba Mon Sep 17 00:00:00 2001 From: Vesa Nieminen Date: Thu, 27 Aug 2009 18:32:18 +0800 Subject: [PATCH] Fixed reading file content to request body data Signed-off-by: sandro turriate --- bin/httparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/httparty b/bin/httparty index 729cc8a..933a770 100755 --- a/bin/httparty +++ b/bin/httparty @@ -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