mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-07 16:33:08 +00:00
24 lines
545 B
Nim
24 lines
545 B
Nim
|
|
{.push raises: [].}
|
||
|
|
|
||
|
|
import
|
||
|
|
json,
|
||
|
|
std/sets,
|
||
|
|
stew/byteutils,
|
||
|
|
strformat,
|
||
|
|
chronicles,
|
||
|
|
json_serialization,
|
||
|
|
json_serialization/std/options,
|
||
|
|
presto/[route, client, common]
|
||
|
|
import ../../../waku_core, ../serdes, ../responses, ../rest_serdes, ./types
|
||
|
|
|
||
|
|
export types
|
||
|
|
|
||
|
|
proc encodeBytes*(value: PushRequest, contentType: string): RestResult[seq[byte]] =
|
||
|
|
return encodeBytesOf(value, contentType)
|
||
|
|
|
||
|
|
proc sendPushRequest*(
|
||
|
|
body: PushRequest
|
||
|
|
): RestResponse[string] {.
|
||
|
|
rest, endpoint: "/lightpush/v1/message", meth: HttpMethod.MethodPost
|
||
|
|
.}
|