Page MenuHomePhabricator

REST API: Wiki redirects include an HTML representation of the redirect in the body of the response
Open, LowPublic

Description

Some endpoints will follow wiki redirects when asked for content (see T301372).

We could include a representation of the redirect page in the body of the response - non-browser API clients will be able to read it, and decide not to follow the redirect. This would be an alternative to sending redirect=no in the request.

Note that the representation may be in JSON, HTML, or JSON and HTML, depending on whether the request was made to v1/page/{title}, v1/page/{title}/html or v1/page/{title}/with_html.

Extracted from T301372: Core Page REST API should follow redirects.

NOTE: this is different from T326743 sais that the response should contain the target title in a machine readable way; This task however asks that the response should include a representation of the page that defines the wikitext redirect.