Sha256: 175a5abcf91b387ad20002e9eb5e65f5f84f2dae01b91e7ebb624bca6b4f3db3
Contents?: true
Size: 508 Bytes
Versions: 5
Compression:
Stored size: 508 Bytes
Contents
module IndieWeb module Endpoints module Services class ResponseHeadersParserService def parse(response, identifier) headers = LinkHeaderParser.parse(response.headers.get('link'), base: response.uri.to_s).by_relation_type[identifier] return unless headers # Reject endpoints that contain a fragment identifier headers.reject { |header| Addressable::URI.parse(header.target_uri).fragment }.map(&:target_uri) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems