http_request.rb 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog +3 -0
- data/lib/http_request.rb +2 -2
- metadata +2 -2
data/Changelog
CHANGED
data/lib/http_request.rb
CHANGED
@@ -33,7 +33,7 @@ class HttpRequest
|
|
33
33
|
include Singleton
|
34
34
|
|
35
35
|
# version
|
36
|
-
VERSION = '1.0.
|
36
|
+
VERSION = '1.0.7'.freeze
|
37
37
|
def self.version;VERSION;end
|
38
38
|
|
39
39
|
# avaiabled http methods
|
@@ -205,7 +205,7 @@ class HttpRequest
|
|
205
205
|
@headers['Accept-Encoding'] = 'gzip,deflate' if defined? Zlib
|
206
206
|
|
207
207
|
# ajax calls?
|
208
|
-
@headers['X_REQUESTED_WITH'] = '
|
208
|
+
@headers['X_REQUESTED_WITH'] = 'XMLHttpRequest' if @options[:ajax] or @options[:xhr]
|
209
209
|
|
210
210
|
# Basic Authenication
|
211
211
|
@headers['Authorization'] = "Basic " + [@uri.userinfo].pack('m').delete!("\r\n") if @uri.userinfo
|
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.0.
|
4
|
+
version: 1.0.7
|
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-08-24 00:00:00 +08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|