Permalink
Browse files

Fixes for Page.cookie type

Remove session field. This isn't present, and if expires is not set
then it is a session cookie.

Typecheck the sameSite strings with bs.string.

Adjusts order to be consistent with Puppeteer.
  • Loading branch information...
zploskey committed Jun 8, 2018
1 parent 01b5f51 commit 6ea5ddf15401e8757b57e55d45d9f12cb5cbf7fd
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/Page.re
@@ -26,8 +26,8 @@ type cookie = {
.
"name": string,
"value": string,
"domain": Js.undefined(string),
"url": Js.undefined(string),
"domain": Js.undefined(string),
"path": Js.undefined(string),
"expires": Js.undefined(float),
"httpOnly": Js.undefined(bool),
@@ -81,14 +81,13 @@ external makeCookie :
(
~name: string,
~value: string,
~domain: string=?,
~url: string=?,
~domain: string=?,
~path: string=?,
~expires: float=?,
~httpOnly: bool=?,
~secure: bool=?,
~session: bool=?,
~sameSite: string=?,
~sameSite: [@bs.string] [ | `Strict | `Lax]=?,
unit
) =>
cookie =

0 comments on commit 6ea5ddf

Please sign in to comment.