mirror of
https://gitee.com/jiuyilian/embedded-framework.git
synced 2025-01-06 10:16:51 -05:00
38 lines
908 B
C
38 lines
908 B
C
#include <unistd.h>
|
|
#include "servers.h"
|
|
void test0()
|
|
{
|
|
// InitLog(LOG_EASYLOGGING, NULL);
|
|
// LogInfo("servers test start.\n");
|
|
SERVERS_HTTP *http = new_servers_http("http://example.com");
|
|
if (http)
|
|
{
|
|
http_get(http);
|
|
if (http->reply)
|
|
{
|
|
// LogInfo("HttpGet ========\n %s\n", http->reply);
|
|
}
|
|
delete_servers_http(http);
|
|
}
|
|
// UnInitLog();
|
|
}
|
|
void test1()
|
|
{
|
|
// InitLog(LOG_EASYLOGGING, NULL);
|
|
// LogInfo("servers test start.\n");
|
|
// SERVERS_HTTP *http = new_servers_http("https://example.com");
|
|
// if (http)
|
|
// {
|
|
// http_get(http);
|
|
// if (http->reply)
|
|
// {
|
|
// LogInfo("HttpGet ========\n %s\n", http->reply);
|
|
// }
|
|
// delete_servers_http(http);
|
|
// }
|
|
// UnInitLog();
|
|
}
|
|
int main(int argc, char *argv[])
|
|
{
|
|
return 0;
|
|
} |