Knuceles
❔ Multithreading an async function
I have an async function that I want to multithread with
n
number of threads, but I get convert error if I initialize the thread with new Thread(methodName)
From my understanding, I need to use the .Wait()
method every time I call the request
method, because it has a Task
object.
The method request()
:
111 replies
✅ Google Analytics Cookies
So I learned that google analytic cookies (identified as _ga, _gid, AMP_Token for name pairs) are generated from client-side from
analytics.js
. So if I open a browser, and visit a site that uses google analytics, I could find those cookies easily.
I want to try implementing a C# program that could obtain those cookies. If I were to send an HTTPWebrequest, and inspect cookies, I believe only the server-side generated cookies show. So how would I see client-side generated cookies?
6 replies
✅ Ways to deserialize Json with dynamic model
I'm currently testing out a new API that I discovered, and I want to explore bunch of API functions and the response data. It would simply take too much time for me to define a Type class as the JSON responses are nested with dozens of arrays and objects, so is there a way for me to dynamically convert response data (HttpResponseMessage) into a C# object?
Simply using <dynamic> wouldn't convert it into a C# object
And I only want to use the optimized native JSON libraries provided in .net 6 and 7, so I wouldn't want to rely on Newton, etc. I'm also aware that there's JSON object to C# class convertor, such as
https://json2csharp.com/
, but I solely want to find a way to dynamically convert without needing C# classes.22 replies