Permalink
Browse files

remove "create" from RESTful POST request

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...
1 parent ad3ddd6 commit 4bc4cd7a01b1a7fac021714717ce77ae9435c021 Luke Steadman committed Jan 3, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 README.md
View
@@ -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);

0 comments on commit 4bc4cd7

Please sign in to comment.