support link header on the server side
-
Guilherme Silveira
def self.extract_link_header(links)
links.collect {|link| "<#{link['href']}>; rel=#{link['rel']}"}.join(', ') enddef test_extract_link_header_from_links
link1 = {"rel" => "home", "href" => "http://google.com"} link2 = {"rel" => "next", "href" => "http://google.com?q=ruby"} links = [link1, link2]expected_header = "http://google.com; rel=home, http://google.com?q=ruby; rel=next" assert_equal expected_header, Tokamak.extract_link_header(links) end
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.