All Projects → jiejieTop → Http Client

jiejieTop / Http Client

Licence: apache-2.0
A high-performance, high-stability, cross-platform HTTP client.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Http Client

Httpp
Micro http server and client written in C++
Stars: ✭ 144 (+67.44%)
Mutual labels:  http-client, curl, https
go-axios
HTTP Request package for golang.
Stars: ✭ 29 (-66.28%)
Mutual labels:  curl, http-client, request
Mqttclient
A high-performance, high-stability, cross-platform MQTT client, developed based on the socket API, can be used on embedded devices (FreeRTOS / LiteOS / RT-Thread / TencentOS tiny), Linux, Windows, Mac, with a very concise The API interface realizes the quality of service of QOS2 with very few resources, and seamlessly connects the mbedtls encryption library.
Stars: ✭ 234 (+172.09%)
Mutual labels:  cross-platform, rtos, ssl
Cheroot
Cheroot is the high-performance, pure-Python HTTP server used by CherryPy. Docs -->
Stars: ✭ 128 (+48.84%)
Mutual labels:  cross-platform, https, ssl
Kurly
kurly is an alternative to the widely popular curl program, written in Golang.
Stars: ✭ 319 (+270.93%)
Mutual labels:  http-client, curl, https
request-extra
⚡️ Extremely stable HTTP request module built on top of libcurl with retries, timeouts and callback API
Stars: ✭ 14 (-83.72%)
Mutual labels:  curl, http-client, request
Libhv
🔥 比libevent、libuv更易用的国产网络库。A c/c++ network library for developing TCP/UDP/SSL/HTTP/WebSocket client/server.
Stars: ✭ 3,355 (+3801.16%)
Mutual labels:  http-client, https, curl
Phin
Node HTTP client
Stars: ✭ 449 (+422.09%)
Mutual labels:  http-client, request, https
Jetty.project
Eclipse Jetty® - Web Container & Clients - supports HTTP/2, HTTP/1.1, HTTP/1.0, websocket, servlets, and more
Stars: ✭ 3,260 (+3690.7%)
Mutual labels:  http-client, https, ssl
electron-request
Zero-dependency, Lightweight HTTP request client for Electron or Node.js
Stars: ✭ 45 (-47.67%)
Mutual labels:  https, http-client, request
Hp Socket
High Performance TCP/UDP/HTTP Communication Component
Stars: ✭ 4,420 (+5039.53%)
Mutual labels:  cross-platform, ssl, https
Urllib
Request HTTP(s) URLs in a complex world
Stars: ✭ 600 (+597.67%)
Mutual labels:  http-client, curl, request
Greenlock
Automatic SSL renewal for NodeJS
Stars: ✭ 30 (-65.12%)
Mutual labels:  https, ssl
Curlie
The power of curl, the ease of use of httpie.
Stars: ✭ 877 (+919.77%)
Mutual labels:  http-client, curl
Create Request
Apply interceptors to `fetch` and create a custom request function.
Stars: ✭ 34 (-60.47%)
Mutual labels:  http-client, request
Xmnetworking
A lightweight but powerful network library with simplified and expressive syntax based on AFNetworking.
Stars: ✭ 980 (+1039.53%)
Mutual labels:  http-client, https
Shgf
Simple HTTP golang framework
Stars: ✭ 13 (-84.88%)
Mutual labels:  https, ssl
Gdown
Download a large file from Google Drive (curl/wget fails because of the security notice).
Stars: ✭ 962 (+1018.6%)
Mutual labels:  wget, curl
Oh My Request
🔮 simple request library by java8
Stars: ✭ 44 (-48.84%)
Mutual labels:  http-client, request
Certify
SSL Certificate Manager UI for Windows, powered by Let's Encrypt. Download from certifytheweb.com
Stars: ✭ 1,075 (+1150%)
Mutual labels:  https, ssl

C/C++ CI issues forks stars license

    __     __   __                       __ _               __ 
   / /_   / /_ / /_ ____          _____ / /(♥)___   ____   / /_
  / __ \ / __// __// __ \ ______ / ___// // // _ \ / __ \ / __/
 / / / // /_ / /_ / /_/ //_____// /__ / // //  __// / / // /_  
/_/ /_/ \__/ \__// .___/        \___//_//_/ \___//_/ /_/ \__/  
                /_/                                                                   

http-client

本项目是一个高稳定性与高性能的 HTTP 客户端,可在多平台使用,拥有极简的 API 接口。

整体架构如下:

http-client架构

解析一下整个架构:

  • 最上方是对外的 API 接口。

  • 接着就是 client 管理器,通过池化技术实现了 client pool,在使用的时候从池中取出 client,用完就放回,用户基本不需要直接接触 client 实例,实现了基本的 HTTP 方法,如 GET/POST 等,还实现了 url 解析器,解析用户传入的 url,生成合适的参数递交给拦截器。

  • 实现工作队列,进行异步处理,在 CPU 支持多核的情况下,根据 CPU 的最大支持线程数量创建多个线程处理,将所有来自上层的请求按顺序放入工作队列,并行处理。

  • intercept 是拦截器,比如实现 HTTP请求HTTP应答 等,它需要依赖 HTTP 报文的处理。拦截器的主要的处理工作是通过上层传入的参数去设置网络信息(host、port 等),与服务器建立连接、重连,发起 HTTP 请求、解析来自服务器的响应报文,自动处理重定向及其他操作,而保证这些操作能完成的需要基础组件,通用的字符串处理、事件的回调处理、 HTTP 的通用信息等,最下方的 read and write 则是与 network 打交道的。

  • network 是网络组件,它可以自动选择数据通道,如果是 加密 方式则通过 tls 进行数据传输,而 tls 可以选择 mbedtls 作为加密后端也可以选择 openssl 作为加密后端;也可以是 tcp 直连方式,最终都是通过 tcp 传输的,此外还实现了本地的 routing(或者叫 dns 缓存,加快域名的解析处理)。

  • platform 是平台抽象层,封装了不同系统的东西,比如 socke 或者 AT线程时间互斥锁内存管理,这些是与系统打交道的,也是跨平台必要的封装。

  • 最右边的则是通用的内容,list 列表的处理、日志库错误代码软件随机数发生器 等。

版本

发布版本 描述
[v1.0.0] 初次发布,完成基本架构的及其稳定性验证

文档说明

欢迎各位朋友参与进来开发,所有的功能实现都有详细的文档介绍,大家可以选择 开发计划 中的项目进行开发、探讨、提交PR,也欢迎大家提交功能需求,本项目将由 杰杰 持续维护。

测试代码 & 文档

参与开发

  • 平台:任何 linux 平台,目前先暂时开发 linux 平台的,后续适配其他平台。

安装 cmake 及编译器

sudo apt-get install -y cmake gcc g++

编译

编写好相关的功能后进行编译并测试,main 函数入口在 test/test.c 文件中。

./build.sh

产生的可执行文件在 ./build/bin/http-client 路径下。

运行

 ./build/bin/http-client

观察测试结果,满足要求后提交 PR

如何提交PR?

问题

欢迎以 GitHub Issues 的形式提交功能需求、问题和 bug 报告等。

版权和许可

http-client 遵循 Apache License v2.0 开源协议。鼓励代码共享和尊重原作者的著作权,可以自由的使用、修改源代码,也可以将修改后的代码作为开源或闭源软件发布。

Star & Fork

后续我还会提供更多开源项目。也非常欢迎大家设计、开发更多实用插件和功能,一起来完善 http-client。如果觉得这个开源项目很赞,可以点击项目主页 右上角的 Star & Fork,同时把它推荐给更多有需要的朋友。

感谢参与贡献的开发者

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].