ICode9

精准搜索请尝试: 精确搜索
  • rust web 的自定义extract获取jwt2022-06-22 21:01:44

    刚开始学习rust的时候,web框架一大堆,感觉无所适从。有的框架类似于 springboot里注解的方式 使用宏,有的是用函数的方式。 随着异步框架 tokio地位的稳固,axum是一个不错的选择。axum采用的是函数的方式。 其实框架里是写好的验证处理程序的。源码里有基本验证和令牌验证两种方式。

  • 【Axum】返回 JSON 文本2022-04-29 14:01:35

    环境 Time 2022-01-16 Rust 1.58.0 Axum 0.4.4 概念 参考:https://docs.rs/axum/latest/axum/index.html 示例 main.rs use axum::{routing::get, Json, Router}; use serde_json::Value; use std::net::SocketAddr; #[tokio::main] async fn main() { let app = Router::ne

  • 【Axum】返回 JSON 对象2022-04-29 14:01:13

    环境 Time 2022-01-16 Rust 1.58.0 Axum 0.4.4 概念 参考:https://docs.rs/axum/latest/axum/index.html 示例 toml [package] edition = "2021" name = "game" version = "0.1.0" [dependencies] axum = "*" serde = {version = "*&

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有