blob: 904dc6db11057c386829c33d44056a00186318cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
var implementation = require('http-platform');
exports.open = function (url, mode, options) {
// todo mode negotiation, particularly for binary vs text buffering
return new implementation.IO(url);
};
exports.read = function (url) {
var stream = exports.open(url);
try {
return stream.read();
} finally {
stream.close();
}
};
|