-
-
Notifications
You must be signed in to change notification settings - Fork 969
Closed
Labels
externalThe issue related to an external projectThe issue related to an external projecttypesThe issue is related to TypeScriptThe issue is related to TypeScript✭ help wanted ✭
Description
What would you like to discuss?
With @types/got
we could use type GotOptions
and be able to pass this to got.get(options)
however with v10 the types are string | OptionsOfDefaultResponseBody
and OptionsOfDefaultResponseBody
and its friends are not available to import at the root of the project. I was wondering if this was on purpose.
What i'm looking for and not sure how to do with v10
const options: GotOptions = {
url: 'https://example.com',
};
const response = await got(options);
Also, this example from the docs isn't working for me and I'm wondering if it should accept a partial? Opened #953 with a demo
got.mergeOptions(got.defaults.options, {
responseType: 'json',
});
Checklist
- I have read the documentation.
Really excited about the release of v10 🎉
viceice, fspoettel, scttcper, ArmorDarks, samhh and 9 morelo1tuma and resynth1943
Metadata
Metadata
Assignees
Labels
externalThe issue related to an external projectThe issue related to an external projecttypesThe issue is related to TypeScriptThe issue is related to TypeScript✭ help wanted ✭