Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 31cba62

Browse files
committed
Aggiornata documentazione
closes #37 #38
1 parent a382830 commit 31cba62

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/NET6CustomLibrary/Docs/README-CustomResponse.md

+10
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@
1313

1414
<b>Note:</b> result can be a message in string format or a response class that returns a DTO
1515

16+
## Example of custom message for a 201 Created status
17+
18+
```csharp
19+
//with TypeCode, indicated in second position by the value zero
20+
throw new ExceptionResponse(HttpStatusCode.Created, 0, "Created", $"Insert a custom object created message here");
21+
22+
//without TypeCode
23+
throw new ExceptionResponse(HttpStatusCode.Created, "Created", $"Insert a custom object created message here");
24+
```
25+
1626
## Example of custom message for a 404 NotFound status
1727

1828
```csharp

0 commit comments

Comments
 (0)