Open eaziz4 opened 1 week ago
uses a curl multi handle for session reuse and to make my calls asynchronous
If you already uses the curl multi interface, I think you can continue using the same API.
I could just replace including libcurl and instead link against the prebuilt static library
Yes. check out this comment: https://github.com/lwthiker/curl-impersonate/issues/80#issuecomment-1166192854
I don't see any header files with the prebuilt libraries so I'm having trouble calling the curl_easy_impersonate() method. I tried to build the library natively on mac with the ./configure --enable-static but I got the following error configure: error: --enable-ech ignored: No ECH support found gmake: *** [Makefile:245: curl-8_7_1/.chrome] Error 1
I managed to build it with the configure script on ubuntu, but I also don't see where any header files would be for me to include so I'm getting the error error: use of undeclared identifier 'curl_easy_impersonate'
I'm not sure if I'm thinking of this the wrong way? On ubuntu I can successfully run this command in my terminal so it looks like curl is fine, but how I'm trying to include + link the libcurl-impersonate library is wrong curl-impersonate-chrome https://www.wikipedia.org
For macOS, you can download the prebuilt binaries on the release page. If you can not somehow call curl_easy_impersonate
, you can still use environment vairables to indicate which version you want to impersonate.
sorry for the basic questions but appreciate the help. Looks like I don't actually call that method as it happens internally. I just need to set the CURL_IMPERSONATE environment variables and everything should work automatically using libcurl like normal? Also I see on linux you can use LD_PRELOAD. Is there a mac alternative?
My networking client is currently like this and I'm looking to be able to have custom headers in my requests. I'm still a little confused on how to accomplish that. https://gist.github.com/eaziz4/8d28d8c8a41c37205b77e0efbdedf29b
Also I see on linux you can use LD_PRELOAD. Is there a mac alternative?
ChatGPT is better at this question.
My networking client is currently like this and I'm looking to be able to have custom headers in my requests. I'm still a little confused on how to accomplish that. https://gist.github.com/eaziz4/8d28d8c8a41c37205b77e0efbdedf29b
What is your confusion exactly?
I currently have a c++ custom http client that uses a curl multi handle for session reuse and to make my calls asynchronous. I want to utilize this library for all of my network calls since my use case is web scraping, but I'm wondering how I should go about that. I also don't see any instructions on how to include this for a c++ project. I would assume I could just replace including libcurl and instead link against the prebuilt static library for my os in my cmake project and that would be that? Any insight would be appreciated. Thanks!