lasp / hapi-server

A HAPI server built on LaTiS
Apache License 2.0
1 stars 1 forks source link

Hapi 70 - Json Response #82

Closed JakeMartin99 closed 2 years ago

JakeMartin99 commented 2 years ago

Adds the capability for the data service to accept Json requests and correctly stream a Json response.

lindholc commented 2 years ago

I noticed a difference between how the info and data endpoints render the header.

In the info response, we get the units as expected: "units":"W/m^2"

In the data response, it looks like something is being escaped: "units": "W\/m^2"

I suspect this has something to do with differences in rendering between circe (used for the info response) and fs2-data (used for the data response). I'll look into it...

lindholc commented 2 years ago

circe and fs2-data do indeed render W/m^2 differently, and there isn't a way to override that behavior in fs2-data.

lindholc commented 2 years ago

W/m^2 and W\/m^2 are semantically equivalent and everything I've tested so far handles the latter fine. Good enough for me.