Added sample Code for an issue#26374
Conversation
'the conditional statement should come after
```
_array = _c.GetSection("array").Get<ArrayExample>();
```
The removal of the early initialization avoids the problem of having empty indexes when the controller processes the request
|
Added sample code for another issue #26370 |
|
@sammychinedu2ky testing the sample, it's great. Works perfect from Postman but from curl I get the following error: And the output window shows info: PipeStreamToBackgroundQueue[0] BTW, Reading the stream from the request body. comes from logging I put in program.cs. |
|
ok, would try it out again. I'm making a new pull request soon on this |
|
you'll also have to reset the position of the stream after reading from the body. Because it was designed to be read once. |
|
This fixes it Can't use single quotes, must be double quotes. You must be on a macboook |
|
ooh, Thanks would use this in the pull request. I'm on windows 😅 |
|
Ha, what shell are you running curl from? I'm running it from a developer command prompt. |
|
I used GitBash to try out the curl. Your update also worked there as well. So I just stuck to the fix you made since it also worked there. |
|
Made a new pull request here #26437 |
|
I just added them and it seems to be working. I'll look at the code now. |
|
Opened a pull request for this last one here #26438 |

Added Sample Code for #26346 and #26370
@Rick-Anderson EDIT:
Fixes #26346 Fixes #26370