-
-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Allow global level Response headers #410
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,6 +164,7 @@ pub struct Response { | |
|
||
#[pymethods] | ||
impl Response { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sansyrox We need to make change here to check for response headers and create the Response accordingly? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ParthS007 , in the future yes. But would we need that for now too? I suppose you are suggesting for things like json content? |
||
// To do: Add check for content-type in header and change response_type accordingly | ||
#[new] | ||
pub fn new(status_code: u16, headers: HashMap<String, String>, body: &PyAny) -> PyResult<Self> { | ||
Ok(Self { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have similar endpoint for
response_header
as forrequest_header
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ParthS007 , we already have one here(https://github.com/sansyrox/robyn/pull/410/files#diff-aff15ced1fe37506f41f2e1d93a4d8312529259f7803f8634ffb5eac4de47823R196)
Is this the same one that you're suggesting?