Skip to content

Commit

Permalink
Merge pull request #46 from goatapp/bugfix_post
Browse files Browse the repository at this point in the history
use request.url even in the case of post/put
  • Loading branch information
marcus authored Feb 5, 2019
2 parents 67df91a + 740027b commit 700033b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/avatax/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def request(method, path, model, options={})
when :get, :delete
request.url("#{URI.encode(path)}?#{URI.encode_www_form(options)}")
when :post, :put
request.path = ("#{URI.encode(path)}?#{URI.encode_www_form(options)}")
request.url("#{URI.encode(path)}?#{URI.encode_www_form(options)}")
request.headers['Content-Type'] = 'application/json'
request.body = model.to_json unless model.empty?
end
Expand Down

0 comments on commit 700033b

Please sign in to comment.