Skip to content

Commit

Permalink
Fix incorrect CookieParam.PartitionKey type which caused deserializat…
Browse files Browse the repository at this point in the history
…ion exceptions
  • Loading branch information
AlexCSDev committed Sep 18, 2024
1 parent a22adb0 commit 33e0148
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/PuppeteerSharp/CookieParam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@ public class CookieParam
/// </summary>
public CookieSourceScheme? SourceScheme { get; set; }

#nullable enable
/// <summary>
/// Cookie partition key. The site of the top-level URL the browser was visiting at the
/// start of the request to the endpoint that set the cookie. Supported only in Chrome.
/// Cookie partition key. Supported only in Chrome.
/// </summary>
public string PartitionKey { get; set; }
public CookiePartitionKey? PartitionKey { get; set; }
#nullable disable

/// <summary>
/// True if cookie partition key is opaque. Supported only in Chrome.
Expand Down
18 changes: 18 additions & 0 deletions lib/PuppeteerSharp/CookiePartitionKey.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace PuppeteerSharp
{
/// <summary>
/// Cookie's Partition Key data.
/// </summary>
public class CookiePartitionKey
{
/// <summary>
/// The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie.
/// </summary>
public string TopLevelSite { get; set; }

/// <summary>
/// Indicates if the cookie has any ancestors that are cross-site to the TopLevelSite.
/// </summary>
public bool HasCrossSiteAncestor { get; set; }
}
}

0 comments on commit 33e0148

Please sign in to comment.