Can't POST inside docker container
cedricve opened this issue · 4 comments
Expected behaviour
Using your library across multiple OS, and it works great. However today I encountered an issue with your library, as it was suddenly returning response code -1 all the time (Failed to query). This only happens for me after I've packed it in a Docker container, so not sure if it will have to do with your library. Though I would like to have an idea or solution why this isn't working properly.
Actual behavior
If I do a raw curl query from the command line (inside the docker container) I get a 200.
But if I run the C++ application it returns code -1
https://github.com/mrtazz/restclient-cpp/blob/master/source/connection.cc#L384
Environment and debugging details
- compiler and version: Docker
- libcurl version and compile flags: curl 7.35.0
- restclient-cpp version: 0.4.4
Looks like this has something todo with SSL: https://stackoverflow.com/questions/44073504/curl-in-docker-container-fails-b-c-of-ssl
Update: 1 step closer, it looks when I try to GET google.com it works. Probably this has something to do with trusted certificates (Behind a SSL CDN Cloudflare). Is there a way I can disable it with this API?