Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Webmention.io /api target= param should accept protocol relative URL to return http + https... #122
The webmention.io /api endpoints accept a 'target' query parameter which currently must be an absolute URL. This proposal extends the 'target' query parameter to also accept a protocol relative URL (i.e. starting with "//") and return all mentions of that target with any protocol (e.g. both 'http:' and 'https:').
Use-case: this will allow sites which have migrated from http to https, or which still serve both http and https and accept webmentions for both, to easily query webmention.io for all mentions to either http/https versions of their permalinks, to show webmentions regardless of which protocol was used in their webmention target URLs.
Test-case: http://tantek.com/2019/065/e1/homebrew-website-club-sf is live with an iframe that embeds a display of RSVP webmentions via a service using a protocol relative URL in the target param to a webmention.io api call. Check both of these:
And you should see at least one RSVP displayed in the bottom from v2.jacky.wtf, likely with a green checkmark
(Originally published at: https://tantek.com/2019/065/b1/webmention-io-target-accept-protocol-relative-url)