You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: UPGRADING.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,21 @@ Prior to this version the response would be `one is missing`.
41
41
42
42
See [#1510](https://github.com/ruby-grape/grape/pull/1510) for more information.
43
43
44
+
#### The default status code for DELETE is now 204 instead of 200.
45
+
46
+
Breaking change: Sets the default response status code for a delete request to 204.
47
+
A status of 204 makes the response more distinguishable and therefore easier to handle on the client side, particularly because a DELETE request typically returns an empty body as the resource was deleted or voided.
48
+
49
+
To achieve the old behavior, one has to set it explicitly:
50
+
```ruby
51
+
delete :iddo
52
+
status 200
53
+
'foo successfully deleted'
54
+
end
55
+
```
56
+
57
+
For more information see: [#1532](https://github.com/ruby-grape/grape/pull/1532).
0 commit comments