Sha256: 22ecdac03f0640409bb3459dc04e4a16ac864ed45ee7482229093509bf8d2f81
Contents?: true
Size: 593 Bytes
Versions: 11
Compression:
Stored size: 593 Bytes
Contents
import ballerina/http; import ballerina/log; // By default, Ballerina exposes a service via HTTP/1.1. service<http:Service> hello bind { port: 9090 } { // Invoke all resources with arguments of server connector and request. sayHello(endpoint caller, http:Request req) { http:Response res = new; // Use a util method to set a string payload. res.setPayload("Hello, World!"); // Send the response back to the caller. caller->respond(res) but { error e => log:printError( "Error sending response", err = e) }; } }
Version data entries
11 entries across 11 versions & 1 rubygems