mirror of
https://gitlab.silvrtree.co.uk/martind2000/rss-braider.git
synced 2025-02-11 06:39:16 +00:00
Rss package bump
This commit is contained in:
parent
1cb16978f8
commit
88dce70e9a
23
examples/request.js
Normal file
23
examples/request.js
Normal file
@ -0,0 +1,23 @@
|
||||
var request = require('request');
|
||||
request(
|
||||
{ method: 'GET'
|
||||
, uri: "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=47820652"
|
||||
, gzip: true
|
||||
}
|
||||
, function (error, response, body) {
|
||||
// body is the decompressed response body
|
||||
console.log('server encoded the data as: ' + (response.headers['content-encoding'] || 'identity'))
|
||||
console.log('the decoded data is: ' + body)
|
||||
}
|
||||
)
|
||||
.on('data', function(data) {
|
||||
// decompressed data as it is received
|
||||
console.log('decoded chunk: ' + data)
|
||||
})
|
||||
.on('response', function(response) {
|
||||
// unmodified http.IncomingMessage object
|
||||
response.on('data', function(data) {
|
||||
// compressed data as it is received
|
||||
console.log('received ' + data.length + ' bytes of compressed data')
|
||||
})
|
||||
});
|
Loading…
Reference in New Issue
Block a user