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

Cant read the request body using StreamReader #183

Open
negrifelipe opened this issue Jun 23, 2022 · 5 comments
Open

Cant read the request body using StreamReader #183

negrifelipe opened this issue Jun 23, 2022 · 5 comments

Comments

@negrifelipe
Copy link

  • NuGet Package Version: 4.0.1
  • .NET SDK Version: 6.0

Steps to Reproduce:

  1. Create a post endpoint without request and without result
  2. Try to read the request body using StreamReader

Here is my full code: https://github.com/negrifelipe/Payments/blob/f74c37141bdf402774b42bc183bcbad538d8c243/src/Payments.Providers.PayPal/Endpoints/NotifyEndpointAsync.cs#L38 using a normal controller solved the issue

@ardalis
Copy link
Owner

ardalis commented Jun 23, 2022

What error did you get?

@negrifelipe
Copy link
Author

negrifelipe commented Jun 23, 2022

I got an empty string

@negrifelipe
Copy link
Author

Maybe its something related to controllers because the endpoint is still a controller the only thing that changes is that the endpoint inherits a class that its a controller

@ardalis
Copy link
Owner

ardalis commented Oct 25, 2022

Can you post your working code? I have no idea why a vanilla controller would work and the inherited controller used by this package wouldn't. Thanks!

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

No branches or pull requests

2 participants