update readme
This commit is contained in:
@@ -205,8 +205,11 @@ envelope, envelope_json_str = msghandler.smartpack("test.topic",
|
|||||||
|
|
||||||
# Step 2: Send via your chosen transport (NATS in this example)
|
# Step 2: Send via your chosen transport (NATS in this example)
|
||||||
conn = NATS.connect("nats.yiem.cc")
|
conn = NATS.connect("nats.yiem.cc")
|
||||||
NATS.publish(conn, "test.topic", envelope_json_str)
|
NATS.publish(conn, "test.topic", envelope_json_str; reply_to="test.replytopic")
|
||||||
NATS.drain(conn)
|
NATS.drain(conn)
|
||||||
|
|
||||||
|
# OR
|
||||||
|
reply = NATS.request("nats.yiem.cc", "test.topic", env_json_str)
|
||||||
```
|
```
|
||||||
|
|
||||||
#### JavaScript (Node.js)
|
#### JavaScript (Node.js)
|
||||||
|
|||||||
Reference in New Issue
Block a user