Skip to content

Commit

Permalink
Raise error on fail
Browse files Browse the repository at this point in the history
  • Loading branch information
colincasey committed Apr 22, 2024
1 parent d8d0189 commit 70d7dfa
Show file tree
Hide file tree
Showing 38 changed files with 3,017 additions and 3,017 deletions.
140 changes: 70 additions & 70 deletions api/docs/tough-cookie.cookiejar._constructor_.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [tough-cookie](./tough-cookie.md) &gt; [CookieJar](./tough-cookie.cookiejar.md) &gt; [(constructor)](./tough-cookie.cookiejar._constructor_.md)

## CookieJar.(constructor)

Creates a new `CookieJar` instance.

**Signature:**

```typescript
constructor(store?: Nullable<Store>, options?: CreateCookieJarOptions | boolean);
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

store


</td><td>

[Nullable](./tough-cookie.nullable.md)<!-- -->&lt;[Store](./tough-cookie.store.md)<!-- -->&gt;


</td><td>

_(Optional)_ a custom [Store](./tough-cookie.store.md) implementation (defaults to [MemoryCookieStore](./tough-cookie.memorycookiestore.md)<!-- -->)


</td></tr>
<tr><td>

options


</td><td>

[CreateCookieJarOptions](./tough-cookie.createcookiejaroptions.md) \| boolean


</td><td>

_(Optional)_ configures how cookies are processed by the cookie jar


</td></tr>
</tbody></table>

## Remarks

- If a custom store is not passed to the constructor, an in-memory store ([MemoryCookieStore](./tough-cookie.memorycookiestore.md) will be created and used. - If a boolean value is passed as the `options` parameter, this is equivalent to passing `{ rejectPublicSuffixes: <value> }`

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [tough-cookie](./tough-cookie.md) &gt; [CookieJar](./tough-cookie.cookiejar.md) &gt; [(constructor)](./tough-cookie.cookiejar._constructor_.md)

## CookieJar.(constructor)

Creates a new `CookieJar` instance.

**Signature:**

```typescript
constructor(store?: Nullable<Store>, options?: CreateCookieJarOptions | boolean);
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

store


</td><td>

[Nullable](./tough-cookie.nullable.md)<!-- -->&lt;[Store](./tough-cookie.store.md)<!-- -->&gt;


</td><td>

_(Optional)_ a custom [Store](./tough-cookie.store.md) implementation (defaults to [MemoryCookieStore](./tough-cookie.memorycookiestore.md)<!-- -->)


</td></tr>
<tr><td>

options


</td><td>

[CreateCookieJarOptions](./tough-cookie.createcookiejaroptions.md) \| boolean


</td><td>

_(Optional)_ configures how cookies are processed by the cookie jar


</td></tr>
</tbody></table>

## Remarks

- If a custom store is not passed to the constructor, an in-memory store ([MemoryCookieStore](./tough-cookie.memorycookiestore.md) will be created and used. - If a boolean value is passed as the `options` parameter, this is equivalent to passing `{ rejectPublicSuffixes: <value> }`

118 changes: 59 additions & 59 deletions api/docs/tough-cookie.cookiejar.clone.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [tough-cookie](./tough-cookie.md) &gt; [CookieJar](./tough-cookie.cookiejar.md) &gt; [clone](./tough-cookie.cookiejar.clone.md)

## CookieJar.clone() method

Produces a deep clone of this CookieJar. Modifications to the original do not affect the clone, and vice versa.

**Signature:**

```typescript
clone(callback: Callback<CookieJar>): void;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

callback


</td><td>

[Callback](./tough-cookie.callback.md)<!-- -->&lt;[CookieJar](./tough-cookie.cookiejar.md)<!-- -->&gt;


</td><td>

A function to call when the CookieJar is cloned.


</td></tr>
</tbody></table>
**Returns:**

void

## Remarks

- When no [Store](./tough-cookie.store.md) is provided, a new [MemoryCookieStore](./tough-cookie.memorycookiestore.md) will be used.

- Transferring between store types is supported so long as the source implements `.getAllCookies()` and the destination implements `.putCookie()`<!-- -->.

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [tough-cookie](./tough-cookie.md) &gt; [CookieJar](./tough-cookie.cookiejar.md) &gt; [clone](./tough-cookie.cookiejar.clone.md)

## CookieJar.clone() method

Produces a deep clone of this CookieJar. Modifications to the original do not affect the clone, and vice versa.

**Signature:**

```typescript
clone(callback: Callback<CookieJar>): void;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

callback


</td><td>

[Callback](./tough-cookie.callback.md)<!-- -->&lt;[CookieJar](./tough-cookie.cookiejar.md)<!-- -->&gt;


</td><td>

A function to call when the CookieJar is cloned.


</td></tr>
</tbody></table>
**Returns:**

void

## Remarks

- When no [Store](./tough-cookie.store.md) is provided, a new [MemoryCookieStore](./tough-cookie.memorycookiestore.md) will be used.

- Transferring between store types is supported so long as the source implements `.getAllCookies()` and the destination implements `.putCookie()`<!-- -->.

0 comments on commit 70d7dfa

Please sign in to comment.