-
Notifications
You must be signed in to change notification settings - Fork 0
Web Rest Api
Crome696 edited this page Nov 3, 2022
·
3 revisions
A typical request contains 2 parts of a message:
- ID of API client (annotated as @PathVariable)
- Body (annotated as @RequestBody)
Communication without a @PathVariable are methods which not require an API client.
Any Response always sends a status code.
- 200 → Technical seen everything is ok
- 400 →
- 405 → Wrong command used
- 415 → Controller definition seems to be mismatching
- This can be mismatching in consuming or producing parameters.
A Post-Command describes a real action that has to be performed. This can be an action like connect to a game server or performing an attack.
A Get-Command is only used for reading objects or data. It's an equivalent for a property getter.
A Delete-Command is used for removing, clearing or deleting something