https://github.com/samuelcampos/uri-change-observer
Observe changes on web resources
https://github.com/samuelcampos/uri-change-observer
node-module
Last synced: 5 months ago
JSON representation
Observe changes on web resources
- Host: GitHub
- URL: https://github.com/samuelcampos/uri-change-observer
- Owner: samuelcampos
- Created: 2016-09-03T23:32:52.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-07-03T13:59:36.000Z (almost 9 years ago)
- Last Synced: 2025-09-27T04:38:00.151Z (8 months ago)
- Topics: node-module
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# uri-change-observer
[](https://travis-ci.org/samuelcampos/uri-change-observer)
[](https://www.npmjs.com/package/uri-change-observer)
Observe changes on web resources. This package enables you to register a callback method to be notified when the result of a given HTTP request changes.
## Installation
You can install using [npm](https://www.npmjs.com/package/uri-change-observer).
```
npm install uri-change-observer
```
## Usage example
```javascript
var URIObservable = require('uri-change-observer');
var httpOptions = {
host: 'samuelcampos.net',
port: '80',
path: '/',
method: 'GET'
};
var observable = new URIObservable();
observable.addObserver(httpOptions, function changeCallback (newData) {
console.log('The web page has changed!', newData);
})
```