(options)
| 77 | #maxRedirects; |
| 78 | |
| 79 | constructor(options) { |
| 80 | // Pass options to native. When cookieJar is provided, pass a truthy value |
| 81 | // to signal that JS handles cookies (actual cookie ops happen in JS). |
| 82 | // Redirects are always handled in JS layer. |
| 83 | super({ |
| 84 | ...options, |
| 85 | headers: canonicalizeHeaders(options?.headers), |
| 86 | }); |
| 87 | |
| 88 | this.#cookieJar = options?.cookieJar; |
| 89 | this.#followRedirects = options?.followRedirects ?? true; |
| 90 | this.#maxRedirects = options?.maxRedirects ?? 20; |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Get cookies from the cookie jar for a URL |
nothing calls this directly
no test coverage detected