wrest 3.0.0 → 4.0.0
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.
- checksums.yaml +5 -5
- data/CHANGELOG +3 -0
- data/LICENCE +1 -1
- data/README.md +29 -28
- data/bin/wrest +2 -1
- data/bin/wrest_shell.rb +10 -8
- data/lib/wrest/async_request/event_machine_backend.rb +3 -1
- data/lib/wrest/async_request/thread_backend.rb +5 -2
- data/lib/wrest/async_request/thread_pool.rb +4 -2
- data/lib/wrest/async_request.rb +7 -6
- data/lib/wrest/cache_proxy.rb +39 -28
- data/lib/wrest/caching/memcached.rb +21 -18
- data/lib/wrest/caching/redis.rb +22 -22
- data/lib/wrest/caching.rb +16 -14
- data/lib/wrest/callback.rb +19 -16
- data/lib/wrest/components/container/alias_accessors.rb +51 -47
- data/lib/wrest/components/container/typecaster.rb +146 -96
- data/lib/wrest/components/container.rb +171 -152
- data/lib/wrest/components/mutators/base.rb +43 -34
- data/lib/wrest/components/mutators/camel_to_snake_case.rb +7 -3
- data/lib/wrest/components/mutators/{xml_mini_type_caster.rb → xml_type_caster.rb} +29 -16
- data/lib/wrest/components/mutators.rb +21 -19
- data/lib/wrest/components/translators/content_types.rb +20 -16
- data/lib/wrest/components/translators/json.rb +19 -16
- data/lib/wrest/components/translators/txt.rb +19 -15
- data/lib/wrest/components/translators/xml/conversions.rb +56 -0
- data/lib/wrest/components/translators/xml.rb +60 -18
- data/lib/wrest/components/translators.rb +7 -6
- data/lib/wrest/components.rb +11 -8
- data/lib/wrest/core_ext/hash/conversions.rb +10 -10
- data/lib/wrest/core_ext/hash.rb +4 -2
- data/lib/wrest/core_ext/string/conversions.rb +14 -13
- data/lib/wrest/core_ext/string.rb +5 -3
- data/lib/wrest/exceptions.rb +4 -2
- data/lib/wrest/hash_with_case_insensitive_access.rb +8 -8
- data/lib/wrest/hash_with_indifferent_access.rb +442 -0
- data/lib/wrest/http_codes.rb +20 -19
- data/lib/wrest/http_shared/headers.rb +2 -0
- data/lib/wrest/http_shared/standard_headers.rb +2 -2
- data/lib/wrest/http_shared/standard_tokens.rb +8 -6
- data/lib/wrest/http_shared.rb +5 -3
- data/lib/wrest/multipart.rb +20 -11
- data/lib/wrest/native/connection_factory.rb +15 -11
- data/lib/wrest/native/delete.rb +15 -11
- data/lib/wrest/native/get.rb +60 -56
- data/lib/wrest/native/options.rb +15 -11
- data/lib/wrest/native/patch.rb +16 -12
- data/lib/wrest/native/post.rb +15 -11
- data/lib/wrest/native/post_multipart.rb +22 -18
- data/lib/wrest/native/put.rb +16 -12
- data/lib/wrest/native/put_multipart.rb +22 -18
- data/lib/wrest/native/redirection.rb +13 -12
- data/lib/wrest/native/request.rb +144 -108
- data/lib/wrest/native/response.rb +87 -78
- data/lib/wrest/native/session.rb +49 -40
- data/lib/wrest/native.rb +14 -12
- data/lib/wrest/test/request_patches.rb +10 -3
- data/lib/wrest/test.rb +3 -1
- data/lib/wrest/uri/builders.rb +14 -12
- data/lib/wrest/uri.rb +70 -52
- data/lib/wrest/uri_template.rb +11 -7
- data/lib/wrest/utils.rb +129 -0
- data/lib/wrest/version.rb +3 -1
- data/lib/wrest.rb +31 -33
- data/lib/wrest_no_ext.rb +2 -0
- metadata +98 -48
- data/lib/wrest/components/mutators/xml_simple_type_caster.rb +0 -37
- data/lib/wrest/xml_mini/jdom/xpath_filter.rb +0 -17
- data/lib/wrest/xml_mini/jdom.rb +0 -6
- data/lib/wrest/xml_mini/libxml/xpath_filter.rb +0 -12
- data/lib/wrest/xml_mini/libxml.rb +0 -8
- data/lib/wrest/xml_mini/nokogiri/xpath_filter.rb +0 -15
- data/lib/wrest/xml_mini/nokogiri.rb +0 -7
- data/lib/wrest/xml_mini/rexml/xpath_filter.rb +0 -15
- data/lib/wrest/xml_mini/rexml.rb +0 -8
- data/lib/wrest/xml_mini.rb +0 -8
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright 2009 Sidu Ponnappa
|
2
4
|
|
3
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -7,18 +9,20 @@
|
|
7
9
|
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
8
10
|
# See the License for the specific language governing permissions and limitations under the License.
|
9
11
|
|
10
|
-
module Wrest
|
11
|
-
module
|
12
|
-
|
13
|
-
options
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
12
|
+
module Wrest
|
13
|
+
module Native
|
14
|
+
module ConnectionFactory
|
15
|
+
def create_connection(options = { timeout: 60, verify_mode: OpenSSL::SSL::VERIFY_NONE })
|
16
|
+
options[:timeout] ||= 60
|
17
|
+
connection = Net::HTTP.new(host, port)
|
18
|
+
connection.read_timeout = options[:timeout]
|
19
|
+
if https?
|
20
|
+
connection.use_ssl = true
|
21
|
+
connection.verify_mode = options[:verify_mode] || OpenSSL::SSL::VERIFY_PEER
|
22
|
+
connection.ca_path = options[:ca_path] if options[:ca_path]
|
23
|
+
end
|
24
|
+
connection
|
20
25
|
end
|
21
|
-
connection
|
22
26
|
end
|
23
27
|
end
|
24
28
|
end
|
data/lib/wrest/native/delete.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright 2009 Sidu Ponnappa
|
2
4
|
|
3
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -7,17 +9,19 @@
|
|
7
9
|
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
8
10
|
# See the License for the specific language governing permissions and limitations under the License.
|
9
11
|
|
10
|
-
module Wrest
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
12
|
+
module Wrest
|
13
|
+
module Native
|
14
|
+
class Delete < Request
|
15
|
+
def initialize(wrest_uri, parameters = {}, headers = {}, options = {})
|
16
|
+
super(
|
17
|
+
wrest_uri,
|
18
|
+
Net::HTTP::Delete,
|
19
|
+
parameters,
|
20
|
+
nil,
|
21
|
+
headers,
|
22
|
+
options
|
23
|
+
)
|
24
|
+
end
|
21
25
|
end
|
22
26
|
end
|
23
27
|
end
|
data/lib/wrest/native/get.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright 2009 Sidu Ponnappa
|
2
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
5
|
# you may not use this file except in compliance with the License.
|
@@ -6,74 +8,76 @@
|
|
6
8
|
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
7
9
|
# See the License for the specific language governing permissions and limitations under the License.
|
8
10
|
|
9
|
-
module Wrest
|
10
|
-
|
11
|
-
|
12
|
-
|
11
|
+
module Wrest
|
12
|
+
module Native
|
13
|
+
class Get < Request
|
14
|
+
QUERY_PARAMS_SEPERATOR = '?'
|
15
|
+
EMPTY_QUERY_PARAMS = ''
|
13
16
|
|
14
|
-
|
17
|
+
attr_reader :cache_proxy
|
15
18
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
+
def initialize(wrest_uri, parameters = {}, headers = {}, options = {})
|
20
|
+
follow_redirects = options[:follow_redirects]
|
21
|
+
options[:follow_redirects] = (follow_redirects.nil? ? true : follow_redirects)
|
19
22
|
|
20
|
-
|
21
|
-
|
23
|
+
cache_store = (options[:cache_store] || Wrest::Caching.default_store) unless options[:disable_cache]
|
24
|
+
@cache_proxy = Wrest::CacheProxy.new(self, cache_store)
|
22
25
|
|
23
|
-
|
24
|
-
|
25
|
-
Net::HTTP::Get,
|
26
|
-
parameters,
|
27
|
-
nil,
|
28
|
-
headers,
|
29
|
-
options
|
30
|
-
)
|
31
|
-
end
|
26
|
+
super(wrest_uri, Net::HTTP::Get, parameters, nil, headers, options)
|
27
|
+
end
|
32
28
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
self.parameters == other.parameters and
|
41
|
-
self.username == other.username and
|
42
|
-
self.password == other.password and
|
43
|
-
self.verify_mode == other.verify_mode
|
44
|
-
false
|
45
|
-
end
|
29
|
+
# Checks equality between two Wrest::Native::Get objects.
|
30
|
+
# Comparing two Wrest::Native::Get objects with identical values for the following properties would return True.
|
31
|
+
# uri, parameters, username, password and ssh verify_mode.
|
32
|
+
def ==(other)
|
33
|
+
return true if equal?(other)
|
34
|
+
return false unless other.class == self.class
|
35
|
+
return true if these_fields_are_equal(other)
|
46
36
|
|
47
|
-
|
48
|
-
|
49
|
-
def hash
|
50
|
-
self.uri.hash + self.parameters.hash + self.username.hash + self.password.hash + self.verify_mode.hash + 20110106
|
51
|
-
end
|
37
|
+
false
|
38
|
+
end
|
52
39
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
40
|
+
# Returns a hash value for this Wrest::Native::Get object.
|
41
|
+
# Objects that returns true when compared using the == operator would return the same hash value also.
|
42
|
+
def hash
|
43
|
+
[uri, parameters, username, password, verify_mode].hash
|
44
|
+
end
|
57
45
|
|
58
|
-
|
59
|
-
|
46
|
+
# :nodoc:
|
47
|
+
def invoke_with_cache_check
|
48
|
+
cache_proxy.get
|
49
|
+
end
|
60
50
|
|
61
|
-
|
62
|
-
|
63
|
-
new_options = options.clone.tap { |opts| opts.delete :cache_store; opts[:disable_cache] = true } # do not run this through the caching mechanism.
|
51
|
+
alias invoke_without_cache_check invoke
|
52
|
+
alias invoke invoke_with_cache_check
|
64
53
|
|
65
|
-
|
66
|
-
|
67
|
-
|
54
|
+
def build_request_without_cache_store(cache_validation_headers)
|
55
|
+
new_headers = headers.clone.merge cache_validation_headers
|
56
|
+
new_options = # do not run this through the caching mechanism.
|
57
|
+
options.clone.tap do |opts|
|
58
|
+
opts.delete :cache_store
|
59
|
+
opts[:disable_cache] = true
|
60
|
+
end
|
61
|
+
Wrest::Native::Get.new(uri, parameters, new_headers, new_options)
|
62
|
+
end
|
68
63
|
|
69
|
-
|
70
|
-
|
71
|
-
|
64
|
+
def full_uri_string
|
65
|
+
@uri.to_s + query_params_string
|
66
|
+
end
|
72
67
|
|
73
|
-
|
74
|
-
def query_params_string
|
75
|
-
(@parameters.any?) ? QUERY_PARAMS_SEPERATOR + @parameters.to_query : EMPTY_QUERY_PARAMS
|
76
|
-
end
|
68
|
+
private
|
77
69
|
|
70
|
+
def these_fields_are_equal(other)
|
71
|
+
(uri == other.uri) &&
|
72
|
+
(parameters == other.parameters) &&
|
73
|
+
(username == other.username) &&
|
74
|
+
(password == other.password) &&
|
75
|
+
(verify_mode == other.verify_mode)
|
76
|
+
end
|
77
|
+
|
78
|
+
def query_params_string
|
79
|
+
@parameters.any? ? QUERY_PARAMS_SEPERATOR + Utils.hash_to_param(@parameters) : EMPTY_QUERY_PARAMS
|
80
|
+
end
|
81
|
+
end
|
78
82
|
end
|
79
83
|
end
|
data/lib/wrest/native/options.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright 2009 Sidu Ponnappa
|
2
4
|
|
3
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -7,17 +9,19 @@
|
|
7
9
|
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
8
10
|
# See the License for the specific language governing permissions and limitations under the License.
|
9
11
|
|
10
|
-
module Wrest
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
12
|
+
module Wrest
|
13
|
+
module Native
|
14
|
+
class Options < Request
|
15
|
+
def initialize(wrest_uri, options = {})
|
16
|
+
super(
|
17
|
+
wrest_uri,
|
18
|
+
Net::HTTP::Options,
|
19
|
+
{},
|
20
|
+
nil,
|
21
|
+
{},
|
22
|
+
options
|
23
|
+
)
|
24
|
+
end
|
21
25
|
end
|
22
26
|
end
|
23
27
|
end
|
data/lib/wrest/native/patch.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright 2009 Sidu Ponnappa
|
2
4
|
|
3
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -7,17 +9,19 @@
|
|
7
9
|
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
8
10
|
# See the License for the specific language governing permissions and limitations under the License.
|
9
11
|
|
10
|
-
module Wrest
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
12
|
+
module Wrest
|
13
|
+
module Native
|
14
|
+
class Patch < Request
|
15
|
+
def initialize(wrest_uri, body = '', headers = {}, parameters = {}, options = {})
|
16
|
+
super(
|
17
|
+
wrest_uri,
|
18
|
+
Net::HTTP::Patch,
|
19
|
+
parameters,
|
20
|
+
body,
|
21
|
+
headers,
|
22
|
+
options
|
23
|
+
)
|
24
|
+
end
|
21
25
|
end
|
22
26
|
end
|
23
|
-
end
|
27
|
+
end
|
data/lib/wrest/native/post.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright 2009 Sidu Ponnappa
|
2
4
|
|
3
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -7,17 +9,19 @@
|
|
7
9
|
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
8
10
|
# See the License for the specific language governing permissions and limitations under the License.
|
9
11
|
|
10
|
-
module Wrest
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
12
|
+
module Wrest
|
13
|
+
module Native
|
14
|
+
class Post < Request
|
15
|
+
def initialize(wrest_uri, body = '', headers = {}, parameters = {}, options = {})
|
16
|
+
super(
|
17
|
+
wrest_uri,
|
18
|
+
Net::HTTP::Post,
|
19
|
+
parameters,
|
20
|
+
body,
|
21
|
+
headers,
|
22
|
+
options
|
23
|
+
)
|
24
|
+
end
|
21
25
|
end
|
22
26
|
end
|
23
27
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright 2009 - 2010 Sidu Ponnappa
|
2
4
|
|
3
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -8,25 +10,27 @@
|
|
8
10
|
# See the License for the specific language governing permissions and limitations under the License.
|
9
11
|
require 'net/http/post/multipart'
|
10
12
|
|
11
|
-
module Wrest
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
request_klass
|
26
|
-
|
13
|
+
module Wrest
|
14
|
+
module Native
|
15
|
+
class PostMultipart < Request
|
16
|
+
def initialize(wrest_uri, parameters = {}, headers = {}, options = {})
|
17
|
+
super(
|
18
|
+
wrest_uri,
|
19
|
+
Net::HTTP::Post::Multipart,
|
20
|
+
parameters,
|
21
|
+
nil,
|
22
|
+
headers,
|
23
|
+
options
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
def build_request(request_klass, uri, parameters, headers)
|
28
|
+
request_klass.new(uri.full_path, parameters, headers)
|
29
|
+
end
|
27
30
|
|
28
|
-
|
29
|
-
|
31
|
+
def do_request
|
32
|
+
@connection.request(@http_request)
|
33
|
+
end
|
30
34
|
end
|
31
35
|
end
|
32
36
|
end
|
data/lib/wrest/native/put.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright 2009 Sidu Ponnappa
|
2
4
|
|
3
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -7,17 +9,19 @@
|
|
7
9
|
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
8
10
|
# See the License for the specific language governing permissions and limitations under the License.
|
9
11
|
|
10
|
-
module Wrest
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
12
|
+
module Wrest
|
13
|
+
module Native
|
14
|
+
class Put < Request
|
15
|
+
def initialize(wrest_uri, body = '', headers = {}, parameters = {}, options = {})
|
16
|
+
super(
|
17
|
+
wrest_uri,
|
18
|
+
Net::HTTP::Put,
|
19
|
+
parameters,
|
20
|
+
body,
|
21
|
+
headers,
|
22
|
+
options
|
23
|
+
)
|
24
|
+
end
|
21
25
|
end
|
22
26
|
end
|
23
|
-
end
|
27
|
+
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright 2009 - 2010 Sidu Ponnappa
|
2
4
|
|
3
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -8,25 +10,27 @@
|
|
8
10
|
# See the License for the specific language governing permissions and limitations under the License.
|
9
11
|
require 'net/http/post/multipart'
|
10
12
|
|
11
|
-
module Wrest
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
request_klass
|
26
|
-
|
13
|
+
module Wrest
|
14
|
+
module Native
|
15
|
+
class PutMultipart < Request
|
16
|
+
def initialize(wrest_uri, parameters = {}, headers = {}, options = {})
|
17
|
+
super(
|
18
|
+
wrest_uri,
|
19
|
+
Net::HTTP::Put::Multipart,
|
20
|
+
parameters,
|
21
|
+
nil,
|
22
|
+
headers,
|
23
|
+
options
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
def build_request(request_klass, uri, parameters, headers)
|
28
|
+
request_klass.new(uri.full_path, parameters, headers)
|
29
|
+
end
|
27
30
|
|
28
|
-
|
29
|
-
|
31
|
+
def do_request
|
32
|
+
@connection.request(@http_request)
|
33
|
+
end
|
30
34
|
end
|
31
35
|
end
|
32
36
|
end
|
@@ -1,25 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright 2009 Sidu Ponnappa
|
2
4
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
5
7
|
# You may obtain a copy of the License at Http://www.apache.org/licenses/LICENSE-2.0
|
6
|
-
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
7
|
-
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
8
|
-
# See the License for the specific language governing permissions and limitations under the License.
|
8
|
+
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
9
|
+
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and limitations under the License.
|
9
11
|
|
10
|
-
module Wrest
|
11
|
-
module Native
|
12
|
-
# Constructed by Wrest::Response.new if the HTTP response code is 3xx
|
12
|
+
module Wrest # :nodoc:
|
13
|
+
module Native # :nodoc:
|
14
|
+
# Constructed by Wrest::Response.new if the HTTP response code is 3xx
|
13
15
|
# (http://en.wikipedia.org/wiki/300_Multiple_Choices#3xx_Redirection)
|
14
|
-
#
|
16
|
+
#
|
15
17
|
# This class is necessary because Net::HTTP doesn't seem to support
|
16
18
|
# redirection natively.
|
17
19
|
class Redirection < Response
|
18
|
-
|
19
20
|
# A get is invoked on the url stored in the response headers
|
20
21
|
# under the key 'location' and the new Response is returned.
|
21
22
|
#
|
22
|
-
# The follow_redirects_count and follow_redirects_limit options
|
23
|
+
# The follow_redirects_count and follow_redirects_limit options
|
23
24
|
# should be present. follow_redirects_count will be incremented by 1.
|
24
25
|
#
|
25
26
|
# This method will raise a Wrest::Exceptions::AutoRedirectLimitExceeded
|
@@ -35,4 +36,4 @@ module Wrest #:nodoc:
|
|
35
36
|
end
|
36
37
|
end
|
37
38
|
end
|
38
|
-
end
|
39
|
+
end
|