Class: RabbitMQ::HTTP::RequestHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/rabbitmq/http/client/request_helper.rb

Instance Method Summary collapse

Instance Method Details

#encode_uri_path_segment(segment) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/rabbitmq/http/client/request_helper.rb', line 10

def encode_uri_path_segment(segment)
  # Correctly escapes spaces, see ruby-amqp/rabbitmq_http_api_client#28.
  #
  # Note that slashes also must be escaped since this is a single URI path segment,
  # not an entire path.
  Addressable::URI.encode_component(segment, Addressable::URI::CharacterClasses::UNRESERVED)
end