Skip to content

Conversation

@markdalgleish
Copy link
Member

This PR removes the SuperHeaders class from @remix-run/headers in favour of individual header parsing functions and updates all consumers to use the new utils.

  • @remix-run/headers no longer exports SuperHeaders/Headers class. Instead, it now exports individual parse*() functions for each header type (e.g. parseContentType(), parseAccept(), etc.) along with parseRawHeaders() and stringifyRawHeaders() utilities.
  • @remix-run/fetch-router now returns a plain Headers instance from RequestContext.headers instead of SuperHeaders, and has dropped the @remix-run/headers peer dependency.
  • @remix-run/multipart-parser has been updated to use the new header parsing functions.
  • @remix-run/response has been updated to use the new header parsing functions.

Copy link
Member

@MichaelDeBoey MichaelDeBoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markdalgleish If this PR is created to fix #10872, an alternative could be to go with @alexandredev3's solution from #10889

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants