0
sukhdeep.dhillon created
- ABP Framework version: v6.0.2
- UI Type: MVC
- Database System: EF Core (SQL Server)
Hi, how can I return different http status code from application layer methods.
for example, for post request, ABP by default returns 200 but I want to return 201.
how can I do that in application layer without going thru controllers.
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
1 Answer(s)
-
0
Hi,
Unfortunately, you can't do this, because the application layer can't access httpcontext.
You can write a middleware to modify the http status code.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)