bogdanfinn / tls-client

net/http.Client like HTTP Client with options to select specific client TLS Fingerprints to use for requests.
BSD 4-Clause "Original" or "Old" License
670 stars 133 forks source link

Cookie Error #38

Closed DemonMartin closed 1 year ago

DemonMartin commented 1 year ago

When running latest Version for node.js,

When I define "requestCookies" in the Payload like this:

"requestCookies": ["locale=en-ES"]

results in this error: {"id":"bc043707-4f84-45de-802c-386f5a0c3c08","body":"json: cannot unmarshal string into Go struct field RequestInput.requestCookies of type tls_client_cffi_src.CookieInput","cookies":null,"headers":null,"status":0,"target":"","usedProtocol":""}

Without any defined cookies, it works fine.

DemonMartin commented 1 year ago

Overread this: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/payload

Tho still when I changed the payload to "requestCookies": [{ "domain": "discord.com", "expires": "0001-01-01T00:00:00Z", "name": "locale", "path": "/", "value": "en-US" }]

This happens: {"id":"7b766038-26ee-42e8-80f6-4427cd249e32","body":"error decoding timestamp: json: cannot unmarshal string into Go value of type int64","cookies":null,"headers":null,"status":0,"target":"","usedProtocol":""}

bogdanfinn commented 1 year ago

Just updated the docs. "expires" need to be a unix timestamp. https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/payload