def pagination_link(relation)
      # split on ',' select the [url] in '<[url]>; rel="[relation]"', compact to all url's found (at most one) and take the first
      (@pagination_links ||= {})[relation] ||= @response.header['Link'] && @response.header['Link'].split(/,\s*<?/).map{ |link| link[/^\s*<?(.*?)>?;\s*rel="#{relation.to_s}"\s*$/, 1] }.compact.first
    end
def pagination_link(relation)
      # split on ',' select the [url] in '<[url]>; rel="[relation]"', compact to all url's found (at most one) and take the first
      (@pagination_links ||= {})[relation] ||= @response.header['Link'] && @response.header['Link'].split(/,\s*<?/).map{ |link| link[/^\s*<?(.*?)>?;\s*rel="#{relation.to_s}"\s*$/, 1] }.compact.first
    end
pagination urls (full paths with server) - relations :first, :prev, :next, :last
 Link: <https://api.itrp.com/v1/requests?page=1&per_page=25>; rel="first", <https://api.itrp.com/v1/requests?page=2&per_page=25>; rel="prev", etc.