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 134 forks source link

CookieJar Option #1

Closed magdev2022 closed 1 year ago

magdev2022 commented 1 year ago

Excuse me, there is no cookiejar option for tls-client?

bogdanfinn commented 1 year ago

@yiming1995 not exactly sure why you need to define a separate cookiejar. a default cookie jar will be used in the http client and you can set / get cookies by calling GetCookies or SetCookies on the client.

Nevertheless i added the option in v0.2.1 to define a custom cookiejar. You just have to implement the http.CookieJar interface. The client interface was also extended to have a function to get the cookiejar from the client: GetCookieJar() http.CookieJar