MCPcopy Create free account
hub / github.com/Semporia/Scripts / initGotEnv

Method initGotEnv

jd_try.js:773–783  ·  view source on GitHub ↗
(opts)

Source from the content-addressed store, hash-verified

771 }
772
773 initGotEnv(opts) {
774 this.got = this.got ? this.got : require('got')
775 this.cktough = this.cktough ? this.cktough : require('tough-cookie')
776 this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar()
777 if (opts) {
778 opts.headers = opts.headers ? opts.headers : {}
779 if (undefined === opts.headers.Cookie && undefined === opts.cookieJar) {
780 opts.cookieJar = this.ckjar
781 }
782 }
783 }
784
785 get(opts, callback = () => {}) {
786 if (opts.headers) {

Callers 2

getMethod · 0.45
postMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected