如果我打电话
curl -I https://example.com
在终端中,我得到了正确的响应Link: <https://example.com/wp-json/>; rel="https://api.w.org/"
如果我打电话$response = wp_remote_head( \'https://example.com\' );
I打印响应。链接:我得到的是Link: ; rel="https://api.w.org/"
Link: ; rel=shortlink
数据中似乎去掉了href,但留下了分号。这是wordpress重新命名的方法,用于断言REST api是否处于活动状态,以及是否选择了永久链接。从页眉获取href链接的正确方法是什么?