diff --git a/Pagination.http b/Pagination.http index 7d81cd0..49b52ec 100644 --- a/Pagination.http +++ b/Pagination.http @@ -16,4 +16,16 @@ GET {{baseUrl}}/products?limit=40&offset=7 test('OK content-range', () => { equal(response.headers['content-range'], '7-46/*'); }); -}} \ No newline at end of file +}} + +GET {{baseUrl}}/products?limit=20&offset=40 +Prefer: count=exact +?? status == 206 +{{ + const { equal } = require('assert'); + let responseItems = JSON. parse(response.body); + let itemsCount = responseItems.length; + test('OK content-range', () => { + equal(response.headers['content-range'], '40-59/77'); + }); +}}