[wp-trac] [WordPress Trac] #49116: Add Links to the REST version of a Resource in the header of the page
WordPress Trac
noreply at wordpress.org
Sun Apr 26 14:37:40 UTC 2020
#49116: Add Links to the REST version of a Resource in the header of the page
-------------------------------------------------+-------------------------
Reporter: dshanske | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: REST API | Version: 4.7
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests dev- | Focuses: rest-api
feedback |
-------------------------------------------------+-------------------------
Comment (by dshanske):
Been looking at this again, and the problem with this is that mime type
application/json is too generic. It doesn't indicate this is a rest
return. And the api.w.org alternate compound rel I was looking at was
ignored by many of the third-party parsers I tried.
So, the best solution appears to be to register a vendor specific mime
type for the rest api. https://www.iana.org/form/media-types. I would
suggest application/vnd.wordpress+json or application/vnd.wp+json. Then we
can simply identify a wordpress rest api resource link. This may require a
separate issue to discuss.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49116#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list