class RabbitMQ::HTTP::RequestHelper

Public Instance Methods

encode_uri_path_segment(segment) click to toggle source
# 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