scrappey
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "scrappey", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -17,3 +17,3 @@ const Scrappey = require('.'); | ||
// 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); | ||
@@ -23,7 +23,7 @@ | ||
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.'); | ||
@@ -30,0 +30,0 @@ } catch (error) { |
13459