File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ interface StringMap {
1515 [ key : string ] : string ;
1616}
1717
18+ /**
19+ * GotConfig
20+ *
21+ * An optional configuration object which is passed to the underlying got http
22+ * client
23+ */
1824export type GotConfig = Partial < GotJSONOptions > ;
1925
2026// Converts a Got header object to one that can be used by the client
Original file line number Diff line number Diff line change @@ -16,6 +16,14 @@ interface Config extends Partial<CoreConfig> {
1616}
1717
1818export class Client extends CoreInterface {
19+ /**
20+ * Client constructor extends CoreInterface by also accepting an optional got
21+ * configuration object as the second argument.
22+ *
23+ * got is the underlying HTTP client that powers core-node. Be careful when
24+ * configuring gotConfig so as not to manually override critical request
25+ * attributes like method, query, header, etc.
26+ */
1927 constructor ( config : Config , gotConfig : GotConfig = { } ) {
2028 const agent = new Agent ( gotConfig ) ;
2129 const header = { "User-Agent" : userAgent } ;
You can’t perform that action at this time.
0 commit comments