Directive ‘via_patch’
via_patch { ... }
The directive activates the routing of PATCH requests to the application. PATCH requests update single resources/model-instances according to the provided JSON payload.
via_patch
may appear inside the directive expose
.
The directive’s block contains allow
(required) and handler
directives (optional), which define run-time code to decide on authorization and contain custom business logic if the built-in default handler is not appropriate.
Example
Request:
PATCH https://example.com/people/44
{"first_name": "Johnny", "last_name": "Gold"}
Response: