httpsimple 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/httpsimple.rb +3 -3
  2. metadata +1 -1
data/lib/httpsimple.rb CHANGED
@@ -2,7 +2,7 @@ require 'net/http'
2
2
  require 'uri'
3
3
 
4
4
  module HttpSimple
5
- VERSION='1.0.1'
5
+ VERSION='1.0.2'
6
6
  def self.get(url, data=nil, &block)
7
7
  request(url, :get, data, &block)
8
8
  end
@@ -61,7 +61,7 @@ module HttpSimple
61
61
  def get(url, params=nil)
62
62
  uri = URI(url)
63
63
  uri.query = URI.encode_www_form(params) unless params.nil?
64
- request = Net::HTTP::Get.new(uri.to_s)
64
+ request = Net::HTTP::Get.new(uri.request_uri)
65
65
 
66
66
  if block_given?
67
67
  yield uri, request
@@ -73,7 +73,7 @@ module HttpSimple
73
73
 
74
74
  def post(url, body=nil)
75
75
  uri = URI(url)
76
- request = Net::HTTP::Post.new(uri.to_s)
76
+ request = Net::HTTP::Post.new(uri.request_uri)
77
77
 
78
78
  case body
79
79
  when String
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: httpsimple
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: