updated example
This commit is contained in:
@@ -66,8 +66,8 @@ type ExampleResponse struct {
|
|||||||
async fn handle(req: http.Request, resp: mut http.Response): {
|
async fn handle(req: http.Request, resp: mut http.Response): {
|
||||||
let response_data = ExampleResponse{
|
let response_data = ExampleResponse{
|
||||||
id: 4,
|
id: 4,
|
||||||
name: "Steven",
|
name: "Andrew",
|
||||||
email: "swerbenjagermanjensen@example.com"
|
email: "andrew@example.com"
|
||||||
};
|
};
|
||||||
await resp.set_status(200);
|
await resp.set_status(200);
|
||||||
await resp.write(json.encode[ExampleResponse](response_data));
|
await resp.write(json.encode[ExampleResponse](response_data));
|
||||||
|
|||||||
Reference in New Issue
Block a user