Skip to content

Commit

Permalink
Using body option instead of query on HTTParty POST calls
Browse files Browse the repository at this point in the history
  • Loading branch information
winton committed Oct 19, 2010
1 parent b086367 commit b1887ad
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions vendor/a_b_plugin/lib/a_b_plugin/api.rb
Expand Up @@ -6,7 +6,7 @@ class API
def self.create_category(attributes={})
return unless Config.token && Config.url
base_uri Config.url
post('/categories.json', :query => compress(
post('/categories.json', :body => compress(
:token => attributes.delete(:token) || Config.token,
:category => attributes
))
Expand All @@ -15,7 +15,7 @@ def self.create_category(attributes={})
def self.create_env(attributes={})
return unless Config.token && Config.url
base_uri Config.url
post('/envs.json', :query => compress(
post('/envs.json', :body => compress(
:token => attributes.delete(:token) || Config.token,
:env => attributes
))
Expand All @@ -24,7 +24,7 @@ def self.create_env(attributes={})
def self.create_site(attributes={})
return unless Config.token && Config.url
base_uri Config.url
post('/sites.json', :query => compress(
post('/sites.json', :body => compress(
:include => attributes.delete(:include),
:only => attributes.delete(:only),
:token => attributes.delete(:token) || Config.token,
Expand All @@ -35,7 +35,7 @@ def self.create_site(attributes={})
def self.create_test(attributes={})
return unless Config.token && Config.url
base_uri Config.url
post('/tests.json', :query => compress(
post('/tests.json', :body => compress(
:include => attributes.delete(:include),
:only => attributes.delete(:only),
:token => attributes.delete(:token) || Config.token,
Expand All @@ -46,7 +46,7 @@ def self.create_test(attributes={})
def self.create_user(attributes={})
return unless Config.token && Config.url
base_uri Config.url
post('/users.json', :query => compress(
post('/users.json', :body => compress(
:token => Config.token,
:user => attributes
))
Expand Down

0 comments on commit b1887ad

Please sign in to comment.