Skip to content

Commit

Permalink
fixed outgoing cookie expires json field to be integer not string;
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanfinn committed Jul 29, 2023
1 parent 0a858d6 commit d4615cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cffi_dist/example_node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const tlsClientLibrary = ffi.Library('./../dist/tls-client-darwin-amd64-1.4.0.dy

const requestPayload = {
"tlsClientIdentifier": "chrome_103",
"followRedirects": false,
"followRedirects": true,
"insecureSkipVerify": false,
"withoutCookieJar": false,
"withDefaultCookieJar": false,
Expand Down Expand Up @@ -57,7 +57,7 @@ tlsClientLibrary.freeMemory(responseObject.id)

const payload = {
sessionId: 'my-session-id',
url: "https://example.com",
url: "https://microsoft.com",
}

const cookiesResponse = tlsClientLibrary.getCookiesFromSession(JSON.stringify(payload))
Expand Down
5 changes: 5 additions & 0 deletions cffi_src/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ func (p *Timestamp) UnmarshalJSON(bytes []byte) error {
return nil
}

func (p *Timestamp) MarshalJSON() ([]byte, error) {
stamp := fmt.Sprintf("%d", p.Unix())
return []byte(stamp), nil
}

// Response is the response that is sent back to the Python client.
type Response struct {
Id string `json:"id"`
Expand Down

0 comments on commit d4615cf

Please sign in to comment.