Permalink
Browse files

only use raw body for POST and PUT requests

  • Loading branch information...
1 parent 752295b commit f4ac92d40f918ce2c2c1ce9e8b02b2b65fdc7d11 @igorw igorw committed with defunkt Dec 7, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 hurl.rb
View
@@ -147,8 +147,8 @@ def initialize(*args)
add_headers_from_arrays(curl, params["header-keys"], params["header-vals"])
# arbitrary post params
- if params['post-body']
- post_data = Array(params['post-body'])
+ if params['post-body'] && ['POST', 'PUT'].index(method)
+ post_data = [params['post-body']]
else
post_data = make_fields(method, params["param-keys"], params["param-vals"])
end

0 comments on commit f4ac92d

Please sign in to comment.