Improve URL handling in ClientRequest for extend() and Options

This commit is contained in:
Napalys
2025-03-21 13:47:06 +01:00
parent 99efb610d4
commit 63193fa91c
3 changed files with 17 additions and 4 deletions

View File

@@ -263,6 +263,12 @@ test_getUrl
| tst.js:328:5:328:38 | got(und ... ptions) | tst.js:328:9:328:17 | undefined |
| tst.js:329:5:329:45 | got(und ... {url})) | tst.js:329:9:329:17 | undefined |
| tst.js:329:5:329:45 | got(und ... {url})) | tst.js:329:40:329:42 | url |
| tst.js:332:5:332:46 | got.ext ... ).get() | tst.js:336:41:336:43 | url |
| tst.js:332:5:332:46 | got.ext ... ).get() | tst.js:339:42:339:44 | url |
| tst.js:337:5:337:20 | jsonClient.get() | tst.js:336:41:336:43 | url |
| tst.js:337:5:337:20 | jsonClient.get() | tst.js:339:42:339:44 | url |
| tst.js:340:5:340:21 | jsonClient2.get() | tst.js:336:41:336:43 | url |
| tst.js:340:5:340:21 | jsonClient2.get() | tst.js:339:42:339:44 | url |
test_getAResponseDataNode
| axiosTest.js:4:5:7:6 | axios({ ... \\n }) | axiosTest.js:4:5:7:6 | axios({ ... \\n }) | json | true |
| axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:12:5:17:6 | axios({ ... \\n }) | json | true |

View File

@@ -329,13 +329,13 @@ function gotTests(url){
got(undefined, undefined, Options({url}));
const options2 = new Options({url});
got.extend(options2).extend(options).get(); // call flagged not the actual url flow
got.extend(options2).extend(options).get();
got.paginate(url, {}); // not flagged
const jsonClient = got.extend({url: url});
jsonClient.get(); // call flagged not the actual url flow
jsonClient.get();
const jsonClient2 = got.extend({url: url}).extend({url: url});
jsonClient2.get(); // call flagged not the actual url flow
jsonClient2.get();
}