-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.
Milestone
Description
Route to code is a great new addition to Asp.net core. New Apis like WriteAsJsonAsync() and ReadFromJsonAsync() are great for creating lightweight endpoints without using API controllers.
Like API controllers we should also have Ok() and BadRequest() methods available on HttpContext.Response object for sending proper response.
I would also like to suggest that WriteAsJsonAsync() should allow setting HttpStatus code. Currently StatusCode is set to 200 by this method.
Metadata
Metadata
Assignees
Labels
area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.