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 CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 5
3
- :patch: 1
3
+ :patch: 2
4
4
  :major: 0
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
- "URI: #{url}\n" +
33
+ "#{http_method.to_s.upcase} #{url}\n" +
34
34
  (
35
35
  if headers.any?
36
- "---\n" + headers.map { |key,values| values.map {|value| Handsoap::Http.normalize_header_key(key) + ": " + value + "\n" }.join("") }.join("")
36
+ "---\n" + headers.map { |key,values| values.map {|value| key + ": " + value + "\n" }.join("") }.join("")
37
37
  else
38
38
  ""
39
39
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: troelskn-handsoap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Troels Knak-Nielsen