RequestList._addRequest()


#1

I noticed in the src a function to add a request to RequestList (before initialize()).

However, I don’t see any information about this in the docs. Can I use this function in my actor? For example:

reqList = new Apify.RequestList({sources: []});
reqList._addRequest({"url": "https://example.com/1","userData": {"label":"examplegroup"}});
reqList._addRequest({"url": "https://example.com/2","userData": {"label":"examplegroup"}});
reqList.initialize();

#2

The RequestList._addRequest() function is internal, so you shouldn’t use it in your code. It can be changed or removed at any time. To initialize the request list, use the sources option in constructor. If you need a dynamically changing list of URLs, please use the RequestQueue class instead.