Skip to content

Commit 082bf1a

Browse files
committed
Use JSONBodyWriter
1 parent a0f6d26 commit 082bf1a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/utils.d

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,12 @@ auto payloadServer(scope HTTPServerRequest req, scope HTTPServerResponse res)
123123
if (expectation.jsonHandler !is null)
124124
expectation.jsonHandler(payloadJson);
125125

126-
payload = payloadJson.toString;
126+
return res.writeJsonBody(payloadJson);
127+
}
128+
else
129+
{
130+
return res.writeBody(payload);
127131
}
128-
return res.writeBody(payload);
129132
}
130133
}
131134

0 commit comments

Comments
 (0)