Set JSON `status` field for response Block

This commit is contained in:
Tristan B. Kildaire 2020-06-18 16:19:47 +02:00
parent bdea323c9d
commit b5c5b3de6b
1 changed files with 4 additions and 0 deletions

View File

@ -60,6 +60,7 @@ public final class ButterflyClient : Thread
/* The JSON response to be sent */
JSONValue responseBlock;
long status = 0;
/* TODO: Implement loop read-write here */
while(active)
@ -241,6 +242,9 @@ public final class ButterflyClient : Thread
}
/* TODO: Write response here */
/* Generate the `status` field */
responseBlock["status"] = status;
/* Write the response block to the client */
writeln("Writing back response: "~responseBlock.toPrettyString());