mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2025-12-30 08:14:25 +00:00
StatusNoContent for zero length data
This commit is contained in:
@@ -2167,6 +2167,11 @@ func (h *Handler) sendFormattedResponse(w common.ResponseWriter, data interface{
|
||||
if data == nil {
|
||||
data = map[string]interface{}{}
|
||||
httpStatus = http.StatusNoContent
|
||||
} else {
|
||||
dataLen := reflection.Len(data)
|
||||
if dataLen == 0 {
|
||||
httpStatus = http.StatusNoContent
|
||||
}
|
||||
}
|
||||
|
||||
if options.SingleRecordAsObject {
|
||||
|
||||
Reference in New Issue
Block a user