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
668 stars 133 forks source link

[Feature Request]: C# Add / Change Cookie #84

Open JvB94 opened 8 months ago

JvB94 commented 8 months ago

Describe the feature / enhancement and how it would improve things

Hey,

I can't get it implemented myself but could you add in your example for C# how I can modify cookies that are sent? I would prefer a method to permanently change a cookie until it is set again.

Describe how your proposal will work, with code and/or pseudo-code

Like on normal HttpClient

HttpCookie cookie = Request.Cookies["testcookie"]; cookie.value = "some new cookie value";

bogdanfinn commented 2 months ago

As i'm not familiar with C# i can't relally do this. But i added examples on how to do that in python and javascript here: https://github.com/bogdanfinn/tls-client/blob/master/cffi_dist/example_node/index_cookies.js