Class: HTTP::Features::NormalizeUri

Inherits:
HTTP::Feature show all
Defined in:
lib/http/features/normalize_uri.rb

Overview

Normalizes request URIs before sending

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from HTTP::Feature

#around_request, #on_error, #on_request, #wrap_request, #wrap_response

Constructor Details

#initialize(normalizer: HTTP::URI::NORMALIZER) ⇒ NormalizeUri

Initializes the NormalizeUri feature

Examples:

NormalizeUri.new(normalizer: HTTP::URI::NORMALIZER)

Parameters:

  • normalizer (#call) (defaults to: HTTP::URI::NORMALIZER)

    URI normalizer



26
27
28
29
# File 'lib/http/features/normalize_uri.rb', line 26

def initialize(normalizer: HTTP::URI::NORMALIZER)
  super()
  @normalizer = normalizer
end

Instance Attribute Details

#normalizer#call (readonly)

The URI normalizer proc

Examples:

feature.normalizer

Returns:

  • (#call)

    the URI normalizer proc



16
17
18
# File 'lib/http/features/normalize_uri.rb', line 16

def normalizer
  @normalizer
end