38 lines
894 B
C
38 lines
894 B
C
#include <unistd.h>
|
|
#include "servers.h"
|
|
void test0()
|
|
{
|
|
// InitLog(LOG_EASYLOGGING, NULL);
|
|
// LogInfo("servers test start.\n");
|
|
ServerHttp *http = NewServersHttp("http://example.com");
|
|
if (http)
|
|
{
|
|
HttpGet(http);
|
|
if (http->reply)
|
|
{
|
|
// LogInfo("HttpGet ========\n %s\n", http->reply);
|
|
}
|
|
DeleteServersHttp(http);
|
|
}
|
|
// UnInitLog();
|
|
}
|
|
void test1()
|
|
{
|
|
// InitLog(LOG_EASYLOGGING, NULL);
|
|
// LogInfo("servers test start.\n");
|
|
// ServerHttp *http = NewServersHttp("https://example.com");
|
|
// if (http)
|
|
// {
|
|
// HttpGet(http);
|
|
// if (http->reply)
|
|
// {
|
|
// LogInfo("HttpGet ========\n %s\n", http->reply);
|
|
// }
|
|
// DeleteServersHttp(http);
|
|
// }
|
|
// UnInitLog();
|
|
}
|
|
int main(int argc, char *argv[])
|
|
{
|
|
return 0;
|
|
} |