July 2017
Beginner to intermediate
358 pages
10h 54m
English
The POST method is used to create a new resource in a collection or to execute a controller. It is typically a non-idempotent action, in that multiple posts to create an element in a collection that will create multiple elements not updated after the first call.
The POST method is always used when calling controllers as the actions of this is considered non-idempotent.
Request:
POST /v1/cats HTTP/1.1 Content-Type: application/json Content-Length: xxxx {"name": "Felix", "weight": 5}
Response:
HTTP/1.1 201 Created Content-Type: application/json Content-Length: 0 Location: /v1/cats/12343
Read now
Unlock full access