I used the code feature of postman to create the code for nodejs using request but no results are returned. Using postman I get a status code of 200 and data is returned. When using node I get a status of 200 but an empty data set is returned.
Code generated for node with cookies modified for security
var request = require("request");
var options = { method: 'POST',
url: 'https://www.netflix.com/api/shakti/v73fa49e3/pathEvaluator',
qs:
{ drmSystem: 'widevine',
isWatchlistEnabled: 'false',
isVolatileBillboardsEnabled: 'true',
falcor_server: '0.1.0',
withSize: 'true',
materialize: 'true' },
headers:
{ 'cache-control': 'no-cache',
'X-Netflix.browserName': 'Chrome',
'X-Netflix.osVersion': '10.0',
'X-Netflix.playerThroughput': '58194',
Referer: 'https://www.netflix.com/browse/my-list',
Accept: '*/*',
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36',
'X-Netflix.esnPrefix': 'NFCDCH-02-',
'X-Netflix.uiVersion': 'v73fa49e3',
'X-Netflix.browserVersion': '75',
Connection: 'keep-alive',
Cookie: '',
'X-Netflix.osName': 'Windows',
'X-Netflix.clientType': 'akira',
'Accept-Language': 'en-US,en;q=0.9,es;q=0.8',
'Accept-Encoding': 'gzip, deflate, br',
DNT: '1',
'X-Netflix.osFullName': 'Windows 10',
Origin: 'https://www.netflix.com' },
form:
{ path:
[ '["mylist",["id","length","name","requestId","trackIds"]]',
'["mylist",{"from":0,"to":400},["availability","availabilityEndDateNear","delivery","interactiveBookmark","maturity","numSeasonsLabel","queue","releaseYear","runtime","seasonCount","summary","title","userRating","userRatingRequestId"]]',
'["mylist",{"from":0,"to":400},"current",["hasAudioDescription","summary"]]',
'["mylist",{"from":0,"to":400},"boxarts","_233x131","webp"]' ],
' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
NOTE: I copied the generated curl code and it returned data as expected.
Thank you.