mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-11 07:16:27 +00:00
6d81e3841a
* Allow text/plain content type descriptor for json formatted content body. Refactored duplicated encode/decode functions for rest api * Fix relay endpoint decodings of content bodies to accept text/plain * Added support for content body decoder for checking media type if additional parameters are present * Fix wrong usage of ContentTypeData - appeared only for tests
20 lines
399 B
Nim
20 lines
399 B
Nim
when (NimMajor, NimMinor) < (1, 4):
|
|
{.push raises: [Defect].}
|
|
else:
|
|
{.push raises: [].}
|
|
|
|
import
|
|
chronicles,
|
|
json_serialization,
|
|
json_serialization/std/options,
|
|
presto/[route, client]
|
|
import
|
|
../serdes,
|
|
../responses,
|
|
../rest_serdes
|
|
|
|
logScope:
|
|
topics = "waku node rest health_api"
|
|
|
|
proc healthCheck*(): RestResponse[string] {.rest, endpoint: "/health", meth: HttpMethod.MethodGet.}
|