ardalis / ardalis/ApiEndpoints

Cant read the request body using StreamReader

Open
#183 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
3.2k
Forks
232
PR merge metrics
No merged PRs in 30d

Description

- 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

Contributor guide

Open the contributing guide

Research direction

Start with NotifyEndpointAsync.cs at the linked line 38 and reproduce the request-body read using NuGet package 4.0.1 and .NET SDK 6.0. Compare the endpoint behavior with the normal controller mentioned in the report; done means a post endpoint without a request or result can read its request body through StreamReader.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.