AbortWithStatusPureJSON calls `Abort()` and then `PureJSON` internally. This method stops the chain, writes the status code and return a JSON body without escaping. It also sets the Content-Type as "application/json".
(code int, jsonObj any)
| 220 | // This method stops the chain, writes the status code and return a JSON body without escaping. |
| 221 | // It also sets the Content-Type as "application/json". |
| 222 | func (c *Context) AbortWithStatusPureJSON(code int, jsonObj any) { |
| 223 | c.Abort() |
| 224 | c.PureJSON(code, jsonObj) |
| 225 | } |
| 226 | |
| 227 | // AbortWithStatusJSON calls `Abort()` and then `JSON` internally. |
| 228 | // This method stops the chain, writes the status code and return a JSON body. |