cloudflare / pingora

A library for building fast, reliable and evolvable network services.
Apache License 2.0
21.03k stars 1.16k forks source link

chore: resolve the TODOs for the pingora client example #9

Closed shaneutt closed 5 months ago

shaneutt commented 6 months ago

There were a couple TODO items in the pingora client examples, this PR resolves them as per their description, and also removes the use of unwraps() throughout the examples.

New example output:

ResponseHeader {
    base: Parts {
        status: 200,
        version: HTTP/2.0,
        headers: {
            "date": "Wed, 28 Feb 2024 15:43:20 GMT",
            "content-type": "text/html; charset=utf-8",
            "content-length": "56604",
            "cf-ray": "85c9c855cace7b04-DEN",
            "access-control-allow-origin": "*",
            "cache-control": "public, max-age=0, must-revalidate",
            "etag": "\"5dd740d0e716a31c1b8437db0263fa93\"",
            "vary": "Accept-Encoding",
            "referrer-policy": "strict-origin-when-cross-origin",
            "x-content-type-options": "nosniff",
            "server": "cloudflare",
            "alt-svc": "h3=\":443\"; ma=86400",
        },
    },
    header_name_map: None,
}
Page Title: 1.1.1.1 — The free app that makes your Internet faster.
shaneutt commented 6 months ago

Thanks @drcaramelsyrup, made several updates ready for re-review :vulcan_salute:

drcaramelsyrup commented 5 months ago

Thanks again for your contribution. This was merged and rebased: 8963575ed23533daaed67ccbe68bdd08051bef88