HonzaSH
Apify & Crawlee4y ago
4 replies
HonzaS

how to set payload in cheerio crawler preNavigationHooks

doing it like this:
preNavigationHooks:[async (crawlingContext, gotOptions) => {
         const { request } = crawlingContext;
             request.payload = `.......`;
 }


does not work, error: ReferenceError: page is not defined
also when I want to set headers, should I use gotOptions.headers= or request.headers=
what is the difference?
Was this page helpful?