naoh1000
V2EX  ›  Rust

请问如何用 Rust 对 API 进行 HTTP2 Push?

  •  
  •   naoh1000 · Feb 23, 2021 via iPhone · 2872 views
    This topic created in 1907 days ago, the information mentioned may be changed or developed.
    找不到任何资料,有了解的 V 友可以讲讲么?
    4 replies    2021-02-23 23:33:52 +08:00
    fakeshadow
        1
    fakeshadow  
       Feb 23, 2021
    试试 h2 这个库
    Hackerchai
        2
    Hackerchai  
       Feb 23, 2021   ❤️ 1
    目前来说应该除了 Hyper 这个库都没有实现 HTTP2 Server Push,文档和 issue 没找到,不过在他的底层库 h2 里面找到了实现 [push_request]( https://docs.rs/h2/0.3.0/h2/server/struct.SendResponse.html#method.push_request)

    其他几个主流 web 框架都还没正式实现:
    [actix-web #36]( https://github.com/actix/actix-web/issues/36), [actix-web #150]( https://github.com/actix/actix-web/issues/150), [rocket #177]( https://github.com/SergioBenitez/Rocket/issues/177), [hyper #1586]( https://github.com/hyperium/hyper/issues/1586)
    mxT52CRuqR6o5
        3
    mxT52CRuqR6o5  
       Feb 23, 2021 via Android
    SingeeKing
        4
    SingeeKing  
    PRO
       Feb 23, 2021 via iPhone
    http2 push 已经被证明意义不大而逐渐准备废弃了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1011 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 22:54 · PVG 06:54 · LAX 15:54 · JFK 18:54
    ♥ Do have faith in what you're doing.