# httpclient **Repository Path**: codingsprite/httpclient ## Basic Information - **Project Name**: httpclient - **Description**: 纯C语言写的http client,支持 https,支持GET POST, 不依赖其他库 - **Primary Language**: C - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 126 - **Created**: 2023-12-29 - **Last Updated**: 2023-12-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # httpclient 纯C语言写的轻量高效的 httpclient, #功能 1. 支持GET POST语义 2. 内置支持https 3. 支持多平台(window linux) https库使用krypton(https://github.com/cesanta/krypton) krypton的作者另外一个作品是mongoose。 http解析部分使用http_parser(https://github.com/nodejs/http-parser) 使用非常简单,把上面文件复制到项目中就可以使用。 ## 编译 2023-12-29 这个项目的意义是进入了krypton与http_parser,这样就可以与kunlun项目结合了 另外tls的验证嵌入式中一般使用mbedtls项目,这个也需要去研究一下 这个项目主要用来download,不能在内存中直接得到数据,所以需要重构一下 ~~~bash gcc app.c -o app -L./ -l httpclient /usr/bin/ld: .//libhttpclient.a(http.o): in function `parser_field_value': http.c:(.text+0x950): undefined reference to `_strdup' /usr/bin/ld: .//libhttpclient.a(http.o): in function `ft_http_sync_download_file': http.c:(.text+0x22db): undefined reference to `_strdup' collect2: error: ld returned 1 exit status make: *** [makefile:2: app] Error 1 ~~~ linux上把`_strdup`改成`strdup`即可