ObjectARX and Libcurl File Download Issues
- Download failure causing CAD crash, error ‘Error handler re-entered. Exiting now’. The reason is that I inherited libcurl-related functions into a class and performed relevant WebAPI interactions within the class. However, because I made a request at the very beginning, I failed to initialize curl, leading to data transfer errors. It just needs to be initialized at the beginning of the function.
1 | curl = curl_easy_init(); |
- Requesting WebAPI data, found the interface unresponsive, and testing with string input separately had no effect. The reason is that my test file contained English characters, leading me to neglect encoding when passing it in. I kept testing ignoring this aspect. To solve this problem, encode Chinese characters before passing them into the header.
1 | std::wstring_convert<codecvt_utf8<wchar_t>> converter; |
URLEncode function
1 | std::string webApi::UrlEncode(const std::string& str) |
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.



