open-phantom

1.0.0 • Public • Published

Open Phantom JS

Open an url with Node Phantom JS:

open(url, method, data)(callback);
  • url: the url to open. If it's relative like in /hi, it will open http://localhost:3000/hi. Otherwise you can pass the full path such as in http://localhost:8080/hi
  • method [default: GET]: how to open the request, it can be 'GET' or 'POST'. Note: 'get', 'Get' and others will be converted with .toUpperCase()
  • data [default: ""]: a string or object of the data to pass. If it's a string, it should be encoded such as web=open%20phantom. If it's an object it will be encoded, such as in { web: 'open phantom' }

Package Sidebar

Install

npm i open-phantom

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • franciscop