X-WP-Total headers


#1

Здравствуйте. Пробую работать с REST API Wordpress, но не могу понять, как можно получить значения X-WP-Total из headers с помощью Swift. В оффициальной документации написано:

To determine how many pages of data are available, the API returns two header fields with every paginated response:

  • X-WP-Total : the total number of records in the collection
  • X-WP-TotalPages : the total number of pages encompassing all available records

By inspecting these header fields you can determine how much more data is available within the API.

developer.wordpress.org/rest-api/using-the-rest-api/pagination/#pagination-parameters

Но как можно получить эти headers?