File tree 3 files changed +12
-6
lines changed
3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change
1
+ == Next
2
+ * enhancements
3
+ * [ #58 ] ( https://github.com/codegram/hyperclient/issues/58 ) : Automatically follow redirects (by [ @dblock ] ( https://github.com/dblock ) ).
4
+
1
5
== 0.3.1
2
6
* backwards incompatible changes
3
- * Nothing
7
+ * Nothing.
4
8
5
9
* enhancements
6
- * Support arrays of Links (by @rehevkor5 )
10
+ * Support arrays of Links (by @rehevkor5 ).
7
11
* Created the CHANGELOG.
8
12
9
- * bug fix
10
- * Nothing
13
+ * bug fixes
14
+ * Nothing.
11
15
12
16
* deprecations
13
- * Nothing
17
+ * Nothing.
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ def connection
42
42
# Returns a block.
43
43
def default_faraday_block
44
44
lambda do |faraday |
45
+ faraday . use FaradayMiddleware ::FollowRedirects
45
46
faraday . request :json
46
47
faraday . response :json , content_type : /\b json$/
47
48
faraday . adapter :net_http
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ module Hyperclient
19
19
20
20
it 'creates a Faraday connection with the default block' do
21
21
handlers = entry_point . connection . builder . handlers
22
+ handlers . must_include FaradayMiddleware ::FollowRedirects
22
23
handlers . must_include FaradayMiddleware ::EncodeJson
23
24
handlers . must_include FaradayMiddleware ::ParseJson
24
25
handlers . must_include Faraday ::Adapter ::NetHttp
@@ -31,4 +32,4 @@ module Hyperclient
31
32
end
32
33
end
33
34
end
34
- end
35
+ end
You can’t perform that action at this time.
0 commit comments