Add Ballerina language (#3818)

* Add Ballerina language

* Add missing file

* Update color

* Update with required changes

* Update sub-module
This commit is contained in:
Shan Mahanama
2017-09-17 17:59:12 +05:30
committed by Colin Seymour
parent 78c58f956e
commit c2d558b71d
11 changed files with 328 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import ballerina.lang.messages;
import ballerina.net.http;
import ballerina.doc;
@doc:Description {value:"By default Ballerina assumes that the service is to be exposed via HTTP/1.1 using the system default port and that all requests coming to the HTTP server will be delivered to this service."}
service<http> helloWorld {
@doc:Description {value:"All resources are invoked with an argument of type message, the built-in reference type representing a network invocation."}
resource sayHello (message m) {
// Creates an empty message.
message response = {};
// A util method that can be used to set string payload.
messages:setStringPayload(response, "Hello, World!");
// Reply keyword sends the response back to the client.
reply response;
}
}