Permalink
Browse files

Using body option instead of query on HTTParty POST calls

  • Loading branch information...
winton committed Oct 19, 2010
1 parent b086367 commit b1887adf1f8a345c6ee7e08bc1d62c0383ac737a
Showing with 5 additions and 5 deletions.
  1. +5 −5 vendor/a_b_plugin/lib/a_b_plugin/api.rb
@@ -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
))
@@ -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
))
@@ -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,
@@ -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,
@@ -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
))

0 comments on commit b1887ad

Please sign in to comment.