Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
api-rest for bot development
this is an axio-based repository for requesting endpoints that use cookies for data authentication and website scraping.
to use, import the modules using an npm install botrest --save
and import into your project.
const botrest = require('botrest');
/* insert the base url to make the request (in the header field, insert the authentication parameters and or tokens. If not, add a null value: botrest('baseURL', {headers})*/
const rest = new botrest('https://iqoption.com/', null)
//get('/endpoint', {querystring: null})
rest.get('/api/appinit', null).then(rest => {
console.log(rest)
})
the system currently supports requests in POST and GET methods
- NOTE: if the endpoints do not use body and or query, consider entering a null value:
get('/endpoint', null)
-post('/endpoint', null, null)
rest.get('/endpoint', {query: 'string'})
rest.post('/endpoint', {body: 'string'}, {query: 'string'})
POST and GET formData methods are used to return absolute values of requests made.
these values can be filled with:
rest.getFormData('/endpoint', {query: 'string'}, {header: 'string'}, 'utf8')
rest.postFormData('/endpoint', {query: 'string'}, {body: 'string'}, {header: 'string'}, 'utf8')
some extra functions used are:
var cookie = rest.cookie()
console.log(cookie)
/* To use the agent definition, it is necessary to enter a numeric value. If this value is null, it will return a random agent: agtController('any') or agtController(2)*/
var agt = rest.agtController('any')
console.log(agt)
FAQs
rest api for development bots
The npm package botrest receives a total of 0 weekly downloads. As such, botrest popularity was classified as not popular.
We found that botrest demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.