Skip to content

Document common usage #136

Description

@nakedible-p

The documentation for the crate does not specify what is the common way to use this crate - it only explains how to extend it for new headers.

It took a bit of trial and error until I finally found the trait HeaderMapExt. And even that trait isn't documented.

The documentation should have something like:

use headers::HeaderMapExt;

let mut headers = HeaderMap::new();
headers.typed_insert(Upgrade::websocket());
let ws = headers.typed_get::<Upgrade>();

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions