-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
In DemoController.ts you return json with the key message:
return res.status(OK).json({
message: DemoController.SUCCESS_MSG + name,
});Therefore you should access response.message in App.tsx:
let response = await fetch('/api/say-hello/SeanMaxwell')
.then(res => res.json());
alert('Hi this is a response from the backend: ' + response.response);Otherwise the alert will display undefined instead of the message.
Metadata
Metadata
Assignees
Labels
No labels