http_request.rb 1.1.1 → 1.1.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.
- data/Changelog +3 -0
- data/README.rdoc +1 -1
- data/lib/http_request.rb +8 -6
- metadata +2 -2
data/Changelog
CHANGED
data/README.rdoc
CHANGED
data/lib/http_request.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# == Version
|
13
13
|
#
|
14
|
-
# v1.1.
|
14
|
+
# v1.1.2
|
15
15
|
#
|
16
16
|
# Last Change: 15 Oct, 2009
|
17
17
|
#
|
@@ -32,7 +32,7 @@ class HttpRequest
|
|
32
32
|
include Singleton
|
33
33
|
class << self
|
34
34
|
# version
|
35
|
-
VERSION = '1.1.
|
35
|
+
VERSION = '1.1.2'.freeze
|
36
36
|
def version;VERSION;end
|
37
37
|
|
38
38
|
# avaiabled http methods
|
@@ -368,10 +368,12 @@ class HttpRequest
|
|
368
368
|
# GO !!
|
369
369
|
if @options[:method] =~ /^(get|head|options|delete|move|copy|trace|)$/
|
370
370
|
@options[:parameters] = "?#{@options[:parameters]}" if @options[:parameters]
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
371
|
+
path = if @options[:parameters] =~ /^\?+$/
|
372
|
+
@uri.path
|
373
|
+
else
|
374
|
+
@uri.path + @options[:parameters]
|
375
|
+
end
|
376
|
+
h = http.method(@options[:method]).call(path, @headers)
|
375
377
|
else
|
376
378
|
h = http.method(@options[:method]).call(@uri.path, @options[:parameters], @headers)
|
377
379
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_request.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xianhua.zhou
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-11-26 00:00:00 +08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|