When dealing directly with the Request object, hyphenated headers are converted to underscores, which is incorrect.
See:
$request = $this->container->get(Request::class);
$pagination = null;
if($request->hasHeader("x_pagination")) {
$pagination = $request->getHeaderLine("x_pagination");
}
The actual header name is x-pagination, as per this JavaScript:
fetch(location.href, {
headers: {
"x-pagination": page
}
}).then(response => {
// ...
});
When dealing directly with the
Requestobject, hyphenated headers are converted to underscores, which is incorrect.See:
The actual header name is
x-pagination, as per this JavaScript: