5
0
Fork 0
Client subscribe counterpart to backend-publish.
 
 
Go to file
UnicodingUnicorn a5dccb1210 Dockerfile 2019-02-18 03:27:12 +08:00
.gitignore Initial commit 2019-02-16 00:16:53 +08:00
Dockerfile Dockerfile 2019-02-18 03:27:12 +08:00
README.md Added reference to backend-store in README 2019-02-16 01:30:16 +08:00
client.pb.go Initial commit 2019-02-16 00:16:53 +08:00
go.mod Dockerfile 2019-02-18 03:27:12 +08:00
go.sum Dockerfile 2019-02-18 03:27:12 +08:00
main.go Initial commit 2019-02-16 00:16:53 +08:00
response.pb.go Initial commit 2019-02-16 00:16:53 +08:00

README.md

backend-subscribe

Client subscribe counterpart to backend-publish. Subscribe to receive the results of your requests to backend-publish in some weird extended streaming async HTTP-ish thing. Refer to backend-store.

API

GET /subscribe/:userid/client/:clientid

Subscribe to your SSE stream.

URL Params

In the future, this will be supplied via token.

Name Type Description Required
userid String User's ID.
clientid String Device's ID. Must be unique to the device. I suggest something based on MAC address.

Success Response (200 OK)

An EventSource stream.

Event

{
  "code": <http status code>
  "message": <message>
}