simple_uri 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple_uri/version.rb +1 -1
- data/lib/simple_uri.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3775df648d936f8ed5afd15e965fcd202ac0f7f4
|
4
|
+
data.tar.gz: 4980e5d942bd91a74af68f9897fcf3881f77dc42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c0b786265a6e375ad804b1f427805a360df0d20acbf0ab23f82a5f71e71f0084fdcc26368f0fd3e9a30ac253d482995de4b4274ea3ac37b3d323280a5101222
|
7
|
+
data.tar.gz: ad8eddf56d282ff8c35674b74084a0689e42c420ea7b2546a64a10363c2ef34db21af2b267140bf5712bd4bd2d92b2adc46934a9e733d289597a9d350d68f311
|
data/lib/simple_uri/version.rb
CHANGED
data/lib/simple_uri.rb
CHANGED
@@ -30,7 +30,7 @@ module SimpleUri
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def send_request(url=nil, method=:get, options={ params: nil, req_body: nil, req_headers: nil, user: nil, password: nil, debug: @@debug_mode, cookies: false })
|
33
|
-
get_params = options[:req_body]
|
33
|
+
get_params = options[:req_body] ? '?'+prepare_req_body(options[:req_body]).to_s : ''
|
34
34
|
options[:params] = method==:post ? nil : get_params
|
35
35
|
req, http = connect(url, method, { params: options[:params], user: options[:user], password: options[:password], debug: options[:debug] })
|
36
36
|
req.body = prepare_req_body(options[:req_body]) if method == :post
|