util.request({ method: 'put', url: 'https://auth.test.whistlejs.com/index2.html' }, function(res, data) { data.headers.should.have.property('authorization'); });
util.request({ method: 'post', headers: { 'x-delete-test': 123 }, url: 'http://delete1.test.whistlejs.com/index.html?post' }, function(res, data) { data.headers.should.have.property('x-delete-test'); data.headers.should.have.property('x-delete-all'); data.headers.should.have.property('x-delete-req'); res.headers.should.have.property('x-delete-res'); });
util.request({ method: 'put', url: 'https://test.whistlejs.com/index.html' }, function(res, data) { data.method.should.equal('PUT'); });
util.request({ url: 'http://pac.test.com/index.html', method: 'post' }, function(res, data) { data.should.be.have.property('type', 'server'); });
util.request({ url: 'http://params.test.whistlejs.com/index.html', method: 'POST', form: {key: 'value'} }, function(res, data) { data.body.should.equal('key=value&test=abc'); });
util.request({ url: 'http://prependbin.test.whistlejs.com/?resBody=', method: 'post' }, function(res, body) { body.should.be.equal(res.body); });
util.request({ url: 'https://filter.com/index.html', method: 'delete', body: 'test', headers: { 'test': 'abc' } }, function(res, data) { data.should.have.property('ec', 1); });
util.request({ method: 'post', url: 'https://css2.test.whistlejs.com/index.html?resBody=_' }, function(res, body) { body.should.equal('_\r\ncss'); });
util.request({ method: 'post', url: 'https://css3.test.whistlejs.com/index.html?resBody=_' }, function(res, body) { body.should.equal('_'); });
util.request({ url: 'https://filter.com/index.html', method: 'post', body: '555555', headers: { 'test': 'abc', 'x-test': 'abc' } }, function(res, data) { data.should.have.property('ec', 2); });
util.request({ method: 'post', url: 'https://html2.test.whistlejs.com/index.html?resBody=_' }, function(res, body) { body.should.equal('_'); });
util.request({ method: 'post', url: 'https://js2.test.whistlejs.com/index.html?resBody=_' }, function(res, body) { body.should.equal('_\r\njs'); });
util.request({ url: 'http://range2.whistlejs.com/', headers: { 'range': 'bytes=2-3,1-8' } }, function(res, body) { body.should.equal(12345678); });