This commit is contained in:
2026-05-24 12:57:45 +07:00
parent 86224c1daf
commit a134bd44bd

View File

@@ -263,7 +263,7 @@ const { smartpack, smartunpack, plikOneshotUpload, fetchWithBackoff } = msghandl
// Data format: [[dataname, data, type], ...]
const payload1 = ["test_message", "Hello World", "text"];
const payload2 = ["config_data", { key: "value" }, "dictionary"];
const payload3 = ["table_data", [{id: 1, name: "Alice"}], "jsontable"];
const payload3 = ["table_data", [{id: 1, name: "Alice"}, {id: 2, name: "Ton"}], "jsontable"];
const file_data = fs.readFileSync('./test/large_image.png'); // Read image from file
const payload4 = ["user_avatar", file_data, "binary"];
@@ -332,6 +332,7 @@ for (const [dataname, data, type] of envelope.payloads) {
### Send Your First Message
```julia
# Julia
using msghandler, NATS
# Data format: [(dataname, data, type), ...]
@@ -361,6 +362,7 @@ reply = NATS.request(conn, "test.topic", envelope_json_str, timeout=10)
### Receive Your First Message
```julia
# Julia
using msghandler, NATS
conn = NATS.connect("nats.yiem.cc")