Skip to content

Conversation

sansyrox
Copy link
Member

Description

This PR fixes #1099

Summary

This PR adds a to_dict method in the headers

PR Checklist

Please ensure that:

  • The PR contains a descriptive title
  • The PR contains a descriptive summary of the changes
  • You build and test your changes before submitting a PR.
  • You have added relevant documentation
  • You have added relevant tests. We prefer integration tests wherever possible

Pre-Commit Instructions:

Copy link

vercel bot commented Jun 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
robyn ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 16, 2025 6:09pm

Copy link

recurseml bot commented Jun 16, 2025

✨ No issues found! Your code is sparkling clean! ✨

Copy link

codspeed-hq bot commented Jun 16, 2025

CodSpeed Performance Report

Merging #1184 will not alter performance

Comparing feat/add-to-dict (d0b2f02) with main (ab90a23)

Summary

✅ 138 untouched benchmarks

@thePromger
Copy link
Contributor

thePromger commented Jun 17, 2025

Can we like this too?

req.headers.get_headers().get("key", "default_value")?

# Also, like this too
req.headers.get("content-type", "text")
If have this key then it will return value else, it will return text as value

Do add functionality in .get method of headers, query_params, etc where it can accept default value too

@sansyrox

@sansyrox
Copy link
Member Author

@k4976 , the headers api will need an overhaul from ground 0 tbh. I don't like it a lot atp. Could you open a new issue?

@thePromger
Copy link
Contributor

@k4976 , the headers api will need an overhaul from ground 0 tbh. I don't like it a lot atp. Could you open a new issue?

Should I create different issues for headers, query params, etc?

What should be the title?

@sansyrox
Copy link
Member Author

@k4976 , something refactor headers api

@thePromger
Copy link
Contributor

@sansyrox
Do clean up the commit history
This PR had taken our old prune commits from main branch

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add to_dict method for request headers

2 participants