We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aed2e69 commit 13b230bCopy full SHA for 13b230b
test/test.js
@@ -367,6 +367,17 @@ describe('node-fetch', () => {
367
});
368
369
370
+ it('should not follow non-GET redirect if body is a readable stream', function() {
371
+ const url = `${base}redirect/307`;
372
+ const opts = {
373
+ method: 'PATCH',
374
+ body: resumer().queue('a=1').end()
375
+ };
376
+ return expect(fetch(url, opts)).to.eventually.be.rejected
377
+ .and.be.an.instanceOf(FetchError)
378
+ .and.have.property('type', 'unsupported-redirect');
379
+ });
380
+
381
it('should obey maximum redirect, reject case', function() {
382
const url = `${base}redirect/chain`;
383
const opts = {
0 commit comments