diff --git a/README.md b/README.md index 0b8a090..f1b1f27 100644 --- a/README.md +++ b/README.md @@ -205,8 +205,11 @@ envelope, envelope_json_str = msghandler.smartpack("test.topic", # Step 2: Send via your chosen transport (NATS in this example) 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) + +# OR +reply = NATS.request("nats.yiem.cc", "test.topic", env_json_str) ``` #### JavaScript (Node.js)