tls-client
is a modern C++17+ library designed for performing secure HTTPS connections with ease and flexibility. The library uses CFFI of the tls-client GO library created by bogdanfinn.
To start using the library, follow these steps:
- Clone the repository
git clone https://github.com/your_username/tls-client-cpp.git
cd tls-client-cpp
- Copy the
include
folder to your repository - Include the library in yout project
#include <include/tls_client.hpp>
#include "include/tls_client.hpp"
int main() {
SessionData sessionData;
RequestData requestData;
ResponseData responseData;
Session session(sessionData);
requestData.url = "https://httpbin.org/get";
responseData = session.GET(requestData);
std::cout << "Status Code: " << responseData.statusCode << std::endl;
std::cout << "Response Body: " << responseData.body << std::endl;
return 0;
}
You can find more examples in the example
directory
Contributions and pull requests are welcome. Read CONTRIBUTING.md for more information.
The code is licensed under the MIT LICENSE