Permalink
Browse files

Merge pull request #1 from insiderpages/master

making gem POST, adding triggered sends
  • Loading branch information...
2 parents d79a5af + 3cbe3dd commit 74a02149d4ad3bb5bd3bccd52060e48e0c50ca78 @pnock pnock committed Sep 13, 2011
Showing with 4 additions and 3 deletions.
  1. +1 −1 exact-target.gemspec
  2. +3 −2 lib/exact_target.rb
View
@@ -2,7 +2,7 @@
Gem::Specification.new do |s|
s.name = %q{exact-target}
- s.version = "0.1.0"
+ s.version = "0.1.6"
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
s.authors = ["David McCullars", "Paul Nock"]
View
@@ -71,19 +71,20 @@ def call(method, *args, &block)
def send_to_exact_target(request)
verify_configure
- uri = URI.parse "#{configuration.base_url}?qf=xml&xml=#{URI.escape request}"
+ uri = URI.parse configuration.base_url
http = net_http_or_proxy.new(uri.host, uri.port)
http.use_ssl = configuration.secure?
http.open_timeout = configuration.http_open_timeout
http.read_timeout = configuration.http_read_timeout
- resp = http.get(uri.request_uri)
+ resp = http.post(uri.request_uri, { 'qf' => 'xml', 'xml'=> request }.to_query)
if resp.is_a?(Net::HTTPSuccess)
resp.body
else
resp.error!
end
end
+
# Define ExactTarget methods
(RequestBuilder.instance_methods(false) & ResponseHandler.instance_methods(false)).each do |m|
define_method(m) do |*args|

0 comments on commit 74a0214

Please sign in to comment.