basic json parsing added

null not supported correctly
This commit is contained in:
2021-02-11 00:30:36 +01:00
parent 982241acf6
commit dc55a967ef
10 changed files with 2050 additions and 849 deletions

View File

@@ -172,7 +172,7 @@ int HttpClient::sslRequest(const std::string &server_name, const std::string &re
int s;
s = socket(AF_INET, SOCK_STREAM, 0);
if (!s) {
printf("Error creating socket.\n");
printf("MlError creating socket.\n");
return -1;
}
@@ -187,7 +187,7 @@ int HttpClient::sslRequest(const std::string &server_name, const std::string &re
// connect to server
if (connect(s, (struct sockaddr *)&sa, socklen)) {
printf("Error connecting to server.\n");
printf("MlError connecting to server.\n");
return -1;
}
@@ -198,7 +198,7 @@ int HttpClient::sslRequest(const std::string &server_name, const std::string &re
SSL_CTX *ctx = SSL_CTX_new(meth);
ssl = SSL_new(ctx);
if (!ssl) {
printf("Error creating SSL.\n");
printf("MlError creating SSL.\n");
log_ssl();
return -1;
}
@@ -209,7 +209,7 @@ int HttpClient::sslRequest(const std::string &server_name, const std::string &re
int err = SSL_connect(ssl);
if (err <= 0) {
printf("Error creating SSL connection. err=%x\n", err);
printf("MlError creating SSL connection. err=%x\n", err);
log_ssl();
fflush(stdout);
return -1;