Skip to content

Commit

Permalink
Update ruby/store.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
Ventata committed Aug 10, 2012
1 parent d65b7b6 commit 6ffda81
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions ruby/store.rb
@@ -1,4 +1,3 @@

class Store


Expand Down Expand Up @@ -28,7 +27,6 @@ def self.create(apiKey,info) #creates a new store at ventata.com
request = Net::HTTP::Post.new(url.request_uri)
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request.content_type = 'application/json'
request.body = jsondata.to_s
#request["Accept"] = 'application/json'
Expand All @@ -50,7 +48,6 @@ def self.modify(apiKey,info) #modify an exiting store by store Id
request = Net::HTTP::Put.new(url.request_uri)
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request.content_type = 'application/json'
request.body = jsondata.to_s
#request["Accept"] = 'application/json'
Expand All @@ -70,7 +67,6 @@ def self.delete(apiKey,storeId) #Delete a store specified by storeId
request = Net::HTTP::Delete.new(url.request_uri)
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request["Content-Length"]="0";

#request["Accept"] = 'application/json'
Expand All @@ -88,7 +84,6 @@ def self.all(apiKey) #Retrieved all store provide data
request = Net::HTTP::Get.new(url.request_uri)
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request.content_type = 'application/json'

#request["Accept"] = 'application/json'
Expand All @@ -108,7 +103,6 @@ def self.get(apiKey,storeId) #Get info of a particular store by Id
request = Net::HTTP::Get.new(url.request_uri)
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request["Accept"] = 'application/json' #You have to set this field in request header in order to obtain
#respose as JSON
response=http.start do |h|
Expand Down

0 comments on commit 6ffda81

Please sign in to comment.