johanlantz / curly Goto Github PK
View Code? Open in Web Editor NEWHigh level libcurl api
License: MIT License
High level libcurl api
License: MIT License
all https requests are error.
01-23 23:34:31.541 17869 17989 V SDK : curly error:Info: TLSv1.2 (OUT), TLS handshake, Client hello (1):
01-23 23:34:31.541 17869 17989 V SDK :
01-23 23:34:31.672 17869 17989 V SDK : curly error:Info: TLSv1.2 (IN), TLS handshake, Server hello (2):
01-23 23:34:31.672 17869 17989 V SDK :
01-23 23:34:31.673 17869 17989 V SDK : curly error:Info: TLSv1.2 (IN), TLS handshake, Certificate (11):
01-23 23:34:31.673 17869 17989 V SDK :
01-23 23:34:31.674 17869 17989 V SDK : curly error:Info: TLSv1.2 (OUT), TLS alert, Server hello (2):
01-23 23:34:31.674 17869 17989 V SDK :
01-23 23:34:31.674 17869 17989 V SDK : curly error:Info: SSL certificate problem: unable to get local issuer certificate
01-23 23:34:31.674 17869 17989 V SDK :
01-23 23:34:31.674 17869 17989 V SDK : curly error:Info: TLSv1.2 (OUT), TLS alert, Client hello (1):
Hey trying to do a simple request using this library, but I'm not able to understand which parameters am I supposed to pass to it. I took a look into the test folder and the code there is not working for me. Here is my latest attempt:
void onHttpRequestCompleted(curly_http_transaction_handle handle, long http_response_code, void* data, long size) {
std::cout << "http request completed " << http_response_code << std::endl;
}
void CalendarHelper::fetchCalendar(std::string credentials) {
std::cout << "Should fetch calendar in cpp" << std::endl;
json j = json::parse(credentials);
// std::cout << "access_token" << j["tokens"]["access_token"] << std::endl;
std::cout << "fetching calendar" << std::endl;
std::string accessToken = std::string(j["tokens"]["access_token"]);
std::string urlStr = "https://www.googleapis.com/calendar/v3/calendars/primary/events?access_token=" + accessToken + "&maxResults=100&singleEvents-trye";
const char* headers = "{\"Accept\":\"application/json\"}";
curly_http_transaction_handle handle = curly_http_get(urlStr.c_str(), headers, &onHttpRequestCompleted); // No matching function call to 'curly_http_get'
}
i found these in the example of libcurl
CRYPTO_set_id_callback((unsigned long ()())thread_id);
CRYPTO_set_locking_callback((void ()())lock_callback);
but why not in your code?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.