-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
Description
The OCPI documentation states that:
When the server receives a valid OCPI object it SHOULD respond with:
• HTTP 200 - Ok when the object already existed and has successfully been updated.
• HTTP 201 - Created when the object has been newly created in the server system.
But the HTTP code is generated based on the OCPI status, so it's difficult to know which HTTP status must be returned.
ocpi-toolkit/ocpi-toolkit-2.2.1/src/main/kotlin/com/izivia/ocpi/toolkit/common/OcpiResponseBody.kt
Line 124 in ed450b6
OcpiStatus.SUCCESS.code -> if (ocpiResponseBody.data != null) HttpStatus.OK else HttpStatus.NOT_FOUND |