Skip to content
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

Response interface #615

Open
sansyrox opened this issue Sep 26, 2023 · 3 comments
Open

Response interface #615

sansyrox opened this issue Sep 26, 2023 · 3 comments
Labels
enhancement New feature or request high-priority

Comments

@sansyrox
Copy link
Member

We want the response interface to automatically server dictionary if it is json compatible but

if has fields that are causing collision then

  • we want to raise issues, i.e. log warnings
  • add the ability to return something like {"body": dictionary }
  • and plain text should remain as is.
@sansyrox sansyrox added enhancement New feature or request high-priority labels Sep 26, 2023
@sansyrox sansyrox pinned this issue Sep 26, 2023
@sansyrox
Copy link
Member Author

sansyrox commented Oct 3, 2023

Thinking of a better interface

we can return a tuple/named tuple

that would allow us to return something like the following

return (
response,
headers,
metadata
)

or

return response, headers, metadata

But I am also thinking this would be inconvenient if someone would like to return a dictionary

@Oluwaseun241
Copy link
Contributor

@sansyrox can I pick this up??

@sansyrox
Copy link
Member Author

sansyrox commented Nov 6, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high-priority
Projects
None yet
Development

No branches or pull requests

2 participants