troelskn-handsoap 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/handsoap/http.rb +3 -3
- data/lib/handsoap/service.rb +1 -1
- metadata +1 -1
data/VERSION.yml
CHANGED
data/lib/handsoap/http.rb
CHANGED
@@ -7,7 +7,7 @@ module Handsoap
|
|
7
7
|
# Represents a HTTP Request.
|
8
8
|
class Request
|
9
9
|
attr_reader :url, :http_method, :headers, :body
|
10
|
-
attr_writer :body
|
10
|
+
attr_writer :body, :http_method
|
11
11
|
def initialize(url, http_method = :get)
|
12
12
|
@url = url
|
13
13
|
@http_method = http_method
|
@@ -30,10 +30,10 @@ module Handsoap
|
|
30
30
|
def inspect
|
31
31
|
"===============\n" +
|
32
32
|
"--- Request ---\n" +
|
33
|
-
"
|
33
|
+
"#{http_method.to_s.upcase} #{url}\n" +
|
34
34
|
(
|
35
35
|
if headers.any?
|
36
|
-
"---\n" + headers.map { |key,values| values.map {|value|
|
36
|
+
"---\n" + headers.map { |key,values| values.map {|value| key + ": " + value + "\n" }.join("") }.join("")
|
37
37
|
else
|
38
38
|
""
|
39
39
|
end
|
data/lib/handsoap/service.rb
CHANGED
@@ -199,7 +199,7 @@ module Handsoap
|
|
199
199
|
end
|
200
200
|
# Does the actual HTTP level interaction.
|
201
201
|
def send_http_request(uri, post_body, headers)
|
202
|
-
request = Handsoap::Http::Request.new(uri)
|
202
|
+
request = Handsoap::Http::Request.new(uri, :post)
|
203
203
|
headers.each do |key, value|
|
204
204
|
request.add_header(key, value)
|
205
205
|
end
|