Skip to content

Commit

Permalink
only use raw body for POST and PUT requests
Browse files Browse the repository at this point in the history
  • Loading branch information
igorw authored and defunkt committed Dec 21, 2010
1 parent 752295b commit f4ac92d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hurl.rb
Expand Up @@ -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
Expand Down

0 comments on commit f4ac92d

Please sign in to comment.