import ballerina/http;
import ballerina/io;
service hello on new http:Listener(9090) {
resource function sayHello(http:Caller caller, http:Request request) {
http:Response response = new;
response.setTextPayload("Hello Ballerina!");
var responseResult = caller->respond(response);
if (responseResult is error) {
io:println("error responding back to client.");
}
}
}
However, I want to apply the latest Ballerina syntax in the SNIPPET.txt file in case we can use it in the future (i.e., when we can show both the snippet and video on the About page as @MatthijsBlom mentioned in the reply above.).
@iHiD - Created a new PR and tagged you to update the code. Please merge.