一个函数搞定 直接调用
用法如下:
int main()
{
char rsp_buf[2048]={0};
//只发请求 不需要等待回复
https_get_request("ipx.xxx.xxx.xx",NULL,80,"xxxx/xxx.req?aa=21"); //替换成自己需要的HTTP请求
//发请求 不需要等待回复
https_get_request_wait_rsp("ipx.xxx.xxx.xx",NULL,80,"xxxx/xxx.req?aa=21",rsp_buf,sizeof(rsp_buf));
//用域名
https_get_request_wait_rsp(NULL,"www.baidu.com",8080,"xxxx/xxx.req?aa=21",rsp_buf,sizeof(rsp_buf));
https_get_request(NULL,"www.baidu.com",8080,"xxxx/xxx.req?aa=21");
printf("=============>\n");
return 0;
}
1