sacred-roseS
Apify & Crawlee3y ago
5 replies
sacred-rose

Inspect the request headers

Is there any way to inspect/log the request headers after goint to a page, just like what you can see in the Developer Console?

I tried to look at ctx.response?.request().allHeaders(), but it is always empty.

postNavigationHooks: [
        async (ctx) => {
          log.info("Request finished", {
            requestUrl: ctx.request.url,
            statusCode: ctx.response?.status() || null,
            requestHeaders: ctx.response?.request().allHeaders(),
          });
        },
      ],
image.png
Was this page helpful?