Skip to content

Commit

Permalink
Fixed typo
Browse files Browse the repository at this point in the history
Changed sessionId to session.
  • Loading branch information
DemonMartin authored Jun 17, 2023
1 parent d2fe401 commit 69d5752
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 69d5752

Please sign in to comment.