Skip to content

Commit

Permalink
remove "create" from RESTful POST request
Browse files Browse the repository at this point in the history
The /post/create URI is incorrect as the whole point of RESTful services is to not set a state:

GET    - Read
POST   - Create
PUT    - Update
DELETE - Delete
  • Loading branch information
Luke Steadman committed Jan 3, 2014
1 parent ad3ddd6 commit 4bc4cd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ $klein->respond('/[:name]', function ($request) {

```php
$klein->respond('GET', '/posts', $callback);
$klein->respond('POST', '/posts/create', $callback);
$klein->respond('POST', '/posts', $callback);
$klein->respond('PUT', '/posts/[i:id]', $callback);
$klein->respond('DELETE', '/posts/[i:id]', $callback);
$klein->respond('OPTIONS', null, $callback);
Expand Down

0 comments on commit 4bc4cd7

Please sign in to comment.