lib/async/http/relative_location.rb in async-http-0.40.3 vs lib/async/http/relative_location.rb in async-http-0.41.0

- old
+ new

@@ -17,18 +17,19 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require_relative 'client' -require_relative 'url_endpoint' - +require_relative 'endpoint' require_relative 'reference' +require 'protocol/http/middleware' + module Async module HTTP # A client wrapper which transparently handles both relative and absolute redirects to a given maximum number of hops. - class RelativeLocation < Middleware - DEFAULT_METHOD = 'GET'.freeze + class RelativeLocation < ::Protocol::HTTP::Middleware + DEFAULT_METHOD = GET def initialize(app, maximum_hops = 4) super(app) @maximum_hops = maximum_hops