Skip to content

Are response headers needed? #34

@AntoniosBarotsis

Description

@AntoniosBarotsis

Recently the Resend Node SDK added the ability to retrieve response headers from the API.

This is currently not supported in the Rust SDK for mainly two reasons:

  • The only use for response headers we have so far is dealing with rate limits. Accessing the headers directly however is not really needed in this crate as we already have ways of dealing with them.
  • I can not come up with a way of adding the headers to this crate that is both not a breaking change for downstream users, as well as not literally just adding a headers field to each and every response object we have, which sounds both annoying, error-prone and wasteful since we'd need to clone the headers each time, regardless of whether most users use them or not.

Exactly because the only use we can think of so far is already handled by the crate (rate limits), I do not feel like implementing this is crucial and I would rather avoid it since I am not happy with the implementations I can think of. I am making this issue mainly to ask downstream users whether they have use cases we have not considered or if they have any ideas about how we could implement this in a better way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions