You have to use res.headers.get("X-WP-TotalPages")
or res.headers.get("X-WP-Total")
to get the header values. See the MDN Fetch documentation’s Headers section.
You have to use res.headers.get("X-WP-TotalPages")
or res.headers.get("X-WP-Total")
to get the header values. See the MDN Fetch documentation’s Headers section.