Skip to content

Feature Request: Make headers available from HTTP Response as a dict #25

@jasonwashburn

Description

@jasonwashburn

Greetings,

After playing around with the python SDK, one of the things I noticed that I think would help with useability from a python perspective would be to expose headers from an http response as a dictionary. The current implementation of a list of tuples containing key value pairs as a pair of strings is a little unwieldy. My assumption is that in any situation where a developer needs to access one or more of the header values, they're likely to first parse it into a dictionary for lookups.

My experience with pyo3 is fairly limited, but from a quick look at the docs, it seems like it should be doable to convert the current Vec<(String, String)> to something like a HashMap and/or into a PyDict?

Thoughts?

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