1.0.0 • Published 8 years ago

open-phantom v1.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
8 years ago

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' }