mirror of
https://github.com/avwo/whistle.git
synced 2026-10-22 01:06:41 +08:00
28 lines
875 B
JavaScript
28 lines
875 B
JavaScript
var util = require('../util.test');
|
|
|
|
module.exports = function() {
|
|
|
|
util.request('http://raw.test.whistlejs.com/index.html?doNotParseJson', function(res, body) {
|
|
res.statusCode.should.equal(500);
|
|
body.should.equal('test');
|
|
res.headers.should.have.property('content-type', 'text/plain');
|
|
});
|
|
|
|
util.request({
|
|
method: 'post',
|
|
url: 'https://raw.test.whistlejs.com/?doNotParseJson'
|
|
}, function(res, body) {
|
|
res.statusCode.should.equal(500);
|
|
body.should.equal('test');
|
|
res.headers.should.have.property('content-type', 'text/plain');
|
|
});
|
|
|
|
util.request('http://xraw.test.whistlejs.com/index2.html', function(res, data) {
|
|
data.should.have.property('type', 'server');
|
|
});
|
|
util.request('http://rwf.w2.org/index.html?doNotParseJson', function(res, body) {
|
|
res.statusCode.should.equal(500);
|
|
body.should.equal('test2');
|
|
});
|
|
};
|