class Protocol::HTTP::Header::Priority

The ‘priority` header allows clients to express their preference for how resources should be prioritized by the server. It can include directives like `urgency` to specify the importance of a request, and `progressive` to indicate whether a response can be delivered incrementally.
Represents the `priority` header, used to indicate the relative importance of an HTTP request.

def << value

Add a value to the priority header.
def << value
	super(value.downcase)
end

def initialize(value = nil)

@parameter value [String | Nil] the value of the priority header, if any.

Initialize the priority header with the given value.
def initialize(value = nil)
	super(value&.downcase)
end

def progressive?

@returns [Boolean] whether the request should be delivered progressively.
def progressive?
	self.include?(PROGRESSIVE)
end

def urgency

@returns [String | Nil] the urgency level if specified, or `nil`.

Returns the urgency level if specified.
def urgency
	if value = self.find{|value| value.start_with?("urgency=")}
		_, level = value.split("=", 2)
		
		return level
	end
end