Closed hevanto closed 2 years ago
Nice catch and thanks for submitting the PR.
I'd argue that sending a nil body is a bug in the charge point implementation, since this is not considered in the specs, but regardless this is a welcome improvement. I'll write a test for this later on.
I noticed some charge points send an empty body rather than an empty object '{}' for requests that do not have properties. E.g. Heartbeat.
This causes a panic in the library. I fixed this by creating an empty object when the input is a nil pointer.