2 ms·
Actually, the URL pattern doesn't define if your API is RESTful or not. You can use similar URL patterns in RPC too. This would be non-RESTful: POST /users
by Geee 11y ago
Actually, the URL pattern doesn't define if your API is RESTful or not. You can use similar URL patterns in RPC too. This would be non-RESTful:
POST /users/create
POST /users/1234/read
POST /users/1234/update
POST /users/1234/delete
Also, in REST you don't have to use this URL pattern. Just make sure that your resources have their own URLs. In addition, resources don't have to map into your database. E.g.
POST /new_address_due_to_move.php?customer_id=1234,
is RESTful, although a bit of a stretch. My line of thought is that if you would have a separate form in your web page, it should be a separate resource with it's own URL where the form data is POSTed.