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

Using MapRequestBodyLayer asynchronously #304

Open
Zizico2 opened this issue Oct 29, 2022 · 7 comments
Open

Using MapRequestBodyLayer asynchronously #304

Zizico2 opened this issue Oct 29, 2022 · 7 comments
Labels
A-new-middleware Area: new middleware proposals C-feature-request Category: A feature request, i.e: not implemented / a PR. E-help-wanted Call for participation: Help is requested to fix this issue. E-medium Call for participation: Experience needed to fix: Medium / intermediate

Comments

@Zizico2
Copy link

Zizico2 commented Oct 29, 2022

Feature Request

Motivation

Is there any chance we can use MapRequestBodyLayer with async functions?

Proposal

Maybe creating AsyncMapRequestBodyLayer-

Alternatives

@davidpdrsn
Copy link
Member

davidpdrsn commented Oct 29, 2022

That requires a separate middleware. I'd accept a pr for that

@Zizico2
Copy link
Author

Zizico2 commented Oct 29, 2022

Okok. I'm repurposing AsyncAuthorizeRequest for now. Just always returning Ok(req). I'd assume that would be good prior art for the PR.

@Zizico2
Copy link
Author

Zizico2 commented Oct 29, 2022

I'll try and shoot one your way

@davidpdrsn davidpdrsn added A-new-middleware Area: new middleware proposals C-feature-request Category: A feature request, i.e: not implemented / a PR. E-help-wanted Call for participation: Help is requested to fix this issue. E-medium Call for participation: Experience needed to fix: Medium / intermediate labels Dec 2, 2022
@mateiidavid
Copy link

@davidpdrsn @Zizico2 is this still something that can be picked up? Looking to learn a bit more about Tower and to contribute something.

@Zizico2
Copy link
Author

Zizico2 commented Feb 13, 2023

@mateiidavid It's a yes from me. I still haven't done any work on this. I'm using the solution I described above. If you come across any roadblock or tough design choice I'd be eager to discuss!

@davidpdrsn
Copy link
Member

@mateiidavid yes!

@mateiidavid
Copy link

Awesome! Thanks to both of you for the replies. I'll try to get something working, probably in a few days once I have more free time. I won't be shy to reach out either here or on Discord if I get stuck :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-new-middleware Area: new middleware proposals C-feature-request Category: A feature request, i.e: not implemented / a PR. E-help-wanted Call for participation: Help is requested to fix this issue. E-medium Call for participation: Experience needed to fix: Medium / intermediate
Projects
None yet
Development

No branches or pull requests

3 participants