goecharger / go-eCharger-API-v1

API specification for V2 go-eCharger (compatible with V3 too)
100 stars 26 forks source link

Content-Type on API #82

Open BrianEstrada opened 3 years ago

BrianEstrada commented 3 years ago

Hello I'm in the process of integrating your api into our platform but i've ran into an issue where the Go-E api doesn't return Content-Type in the headers for the response my application expects to see the following application/json value for json bodies

Any chance that you could return that value when sending JSON?

0xFEEDC0DE64 commented 3 years ago

Hi, I guess we shouldn't change this in older hw1 and hw2 models, as many http clients tend to start parsing the json if the content type also says json. Right now it is plain text and every implemention does a json parse on the response. when switching to content type json, json parsing the already parsed json would fail and break any existing installation.

hardware-v3 always sent content type json so I guess you have a hardware v1 or v2?