If I call
curl -I https://example.com
In terminal I get the correct response
Link: <https://example.com/wp-json/>; rel="https://api.w.org/"
If I call
$response = wp_remote_head( 'https://example.com' );
The I print_r the response. The Link: I get is
Link: ; rel="https://api.w.org/"
Link: ; rel=shortlink
There seems to be the href stripped out of the data, but the semi-colon has been left. This is the reccomemded way from wordpress to assert if REST api is active and if pretty permalinks are selected.
What is the correct way to get the href link from the from a page header?