From 69d57529878934df6d0e7ce45bb58b4a43e1b2af Mon Sep 17 00:00:00 2001 From: Demon Martin <49092993+DemonMartin@users.noreply.github.com> Date: Sat, 17 Jun 2023 21:21:48 +0200 Subject: [PATCH] Fixed typo Changed sessionId to session. --- test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test.js b/test.js index f0d721b..2e8f402 100644 --- a/test.js +++ b/test.js @@ -14,16 +14,16 @@ async function runTest() { console.log(session) // Make a GET request - const getRequestResult = await scrappey.getRequest('https://reqres.in/api/users', session.sessionId); + const getRequestResult = await scrappey.getRequest('https://reqres.in/api/users', session.session); console.log('GET Request Result:', getRequestResult); // Make a POST request const postData = { username: 'user123', password: 'pass456' }; - const postRequestResult = await scrappey.postRequest('https://reqres.in/api/users', postData, session.sessionId); + const postRequestResult = await scrappey.postRequest('https://reqres.in/api/users', postData, session.session); console.log('POST Request Result:', postRequestResult); // Destroy the session - await scrappey.destroySession(session.sessionId); + await scrappey.destroySession(session.session); console.log('Session destroyed.'); } catch (error) { console.error(error);