Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /usr/local/lib/node_modules/create-react-app/node_modules/hyperquest/test/ drwxr-xr-x | |
| Viewing file: Select action/file-type: var test = require('tape');
var http = require('http');
var hyperquest = require('../');
var through = require('through2');
var server = http.createServer(function (req, res) {
res.setHeader('content-type', 'text/robot-speak');
res.end('beep boop');
});
test('1st-arg options', function (t) {
t.plan(2);
server.listen(0, function () {
var port = server.address().port;
check(t, port);
});
t.on('end', server.close.bind(server));
});
function check (t, port) {
var r = hyperquest(
{ uri: 'http://localhost:' + port },
function (err, res) {
t.equal(res.headers['content-type'], 'text/robot-speak');
}
);
r.pipe(through(write, end));
var data = '';
function write (buf, enc, cb) { data += buf; cb() }
function end () {
t.equal(data, 'beep boop');
}
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0043 ]-- |