Exploring REST API age and trying to get html for a page gives 406 error.
For example:
https://en.wikipedia.org/api/rest_v1/#!/Page_content/get_page_html_title
Select Main_Page as title and then press "try it out"
Error code of 406 is returned.
It is because, the response content selected by default is text/html, where as the curl request if formatted for another option as given below.
curl -X GET --header 'Accept: application/problem+json' 'https://en.wikipedia.org/api/rest_v1/page/html/Main_Page'
Changing the response content to application/problem+json and then trying it successfully gives html as the curl request that is sent is accepted
curl -X GET --header 'Accept: text/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/HTML/2.1.0"' 'https://en.wikipedia.org/api/rest_v1/page/html/Main_Page'
Please change the response content selection to match the curl request.