-
Notifications
You must be signed in to change notification settings - Fork 188
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
CreatedResult in .NET 8 does not return status code 201 #2475
Labels
Comments
Thanks for reporting will check and update. |
@fabiocav pls comment and validate. |
bhagyshricompany
added
Needs: Triage (functions)
Needs: Author feedback
and removed
Needs: Attention 👋
bug
Needs: Triage (functions)
labels
May 29, 2024
Hi @thomaseyde I checked and found its returning proper status code can you check that again.
|
bhagyshricompany
added
Needs: Triage (functions)
and removed
Needs: Author feedback
labels
May 29, 2024
@bhagyshricompany your code example is not the same as mine. You call a different constructor which, most likely, does different work. |
yes as i tries with your code on that staus code is 201but that is api properties not coming cause of azure function. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PostCreated
IActionResult
new CreatedResult()
POST http://localhost:7071/api/PostCreated
204
, not201
Decompiled code shows that the default constructor passes
null
to its base and does not initialize theStatusCode
property. I suspect this causes the default return value to be returned.Decompiled code:
NuGet packages:
Http trigger:
The text was updated successfully, but these errors were encountered: