-
-
Save CuberL/250e3687875376985bde9cfb013e922f to your computer and use it in GitHub Desktop.
problem in tbox http client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "tbox/tbox.h" | |
int main() { | |
tb_init(tb_null, tb_null); | |
int i = 10; | |
while (i --> 1) { | |
tb_http_ref_t http = tb_http_init(); | |
tb_http_ctrl(http, TB_HTTP_OPTION_SET_COOKIES, tb_cookies()); | |
tb_http_ctrl(http, TB_HTTP_OPTION_SET_METHOD, TB_HTTP_METHOD_GET); | |
tb_http_ctrl(http, TB_HTTP_OPTION_SET_URL, "http://google.com"); | |
if (!tb_http_open(http)) { | |
return -1; | |
} | |
tb_http_status_t *status = tb_http_status(http); | |
tb_http_exit(http); | |
tb_http_close(http); | |
} | |
tb_sleep(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment