This repository has been archived by the owner on Oct 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
60 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
target/ | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[package] | ||
org = "wso2" | ||
name = "helloservice9093project" | ||
version = "0.0.1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import ballerina/http; | ||
import ballerina/io; | ||
|
||
// By default, Ballerina exposes an HTTP service via HTTP/1.1. | ||
service /hello on new http:Listener(9093) { | ||
|
||
// Resource functions are invoked with the HTTP caller and the | ||
// incoming request as arguments. | ||
resource function get sayHello(http:Caller caller, http:Request req) returns error? { | ||
// Send a response back to the caller. | ||
io:println("request received"); | ||
check caller->respond("Hello, World!"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import ballerina/http; | ||
|
||
// By default, Ballerina exposes an HTTP service via HTTP/1.1. | ||
service /hello on new http:Listener(9092) { | ||
|
||
// Resource functions are invoked with the HTTP caller and the | ||
// incoming request as arguments. | ||
resource function get sayHello(http:Caller caller, http:Request req) returns error? { | ||
// Send a response back to the caller. | ||
check caller->respond("Hello, World!"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters