Before explaining how to set it up, I ask you to carefully analyze whether you need this. Server Push benefits mostly clients which can prioritize resource fetching to optimize other flows (p.ex.: browser rendering cycle), but don’t help much in server-to-server HTTP interactions. In fact, in order to reliably support Server Push, one has to throttle request concurrency.
That being said, here’s how you can use it. Remember that push streams only be accepted if the pushed request was also requested by the client.
http = HTTPX.plugin(:push_promise) responses = http.get("https://www.google.com", "https://www.google.com/styles.css")
Next: H2C Upgrade