Search

Lib.rs

› Web programming › HTTP server
#httpbin #的 #actix-web

app httpbin-rs

使用 Rust 实现 httpbin

by poneding

  • Install
  • GitHub repo (poneding)
  • API Reference

1 unstable release

0.1.0 Feb 20, 2025

#301 in HTTP server

21 downloads per month

MIT/Apache

30KB
560 lines

httpbin-rs

使用 Rust 实现 httpbin。

目标

  • 使用 Rust 及其生态,学习并记录;
  • 实现 httpbin 的所有功能;

技术栈

  • rust
  • actix-web
  • tokio

笔记

  • 01.初始化项目
  • 02.支持 Docker 部署
  • 03.集成 GitHub Action 构建
  • 04.集成 OpenAPI
  • 05.实现 HTTP Methods 接口
  • 06.实现 Auth 接口
  • 07.实现 Request inspection 接口
  • 08.实现 Response inspection 接口
  • 09.实现 Response formats 接口
  • 10.实现 Dynamic data 接口
  • 11.实现 Cookies 接口
  • 12.实现 Images 接口
  • 13.实现 Redirects 接口
  • 14.实现 Anything 接口

actix-web

  • 中间件

tokio

  • sleep

utoipa

  • auth

附录

  • cargo-watch

Dependencies

~18–30MB
~491K SLoC

  • actix-web
  • base64 0.22.1
  • env_logger 0.11.6
  • serde+derive
  • serde_json
  • tokio+default
  • utoipa 5.3
  • utoipa-swagger-ui 9.0+actix-web
See also: pku3b, win-wrap, lintestor, qiniu-upload-token, actix-web, actix-cors, actix-ws, actix-web-lab, tracing-actix-web, apistos, axum-login

Lib.rs is an unofficial list of Rust/Cargo crates, created by kornelski. It contains data from multiple sources, including heuristics, and manually curated data. Content of this page is not necessarily endorsed by the authors of the crate. This site is not affiliated with nor endorsed by the Rust Project. If something is missing or incorrect, please file a bug.