diff --git a/examples/http-service-and-resource-paths/http_service_and_resource_paths.bal b/examples/http-service-and-resource-paths/http_service_and_resource_paths.bal index ebfe40a71f..01966a9c31 100644 --- a/examples/http-service-and-resource-paths/http_service_and_resource_paths.bal +++ b/examples/http-service-and-resource-paths/http_service_and_resource_paths.bal @@ -15,8 +15,12 @@ table key(title) albums = table [ // It can be represented by both identifiers and string literals. E.g., `/music\-info`, `"/music-info"`. service /info on new http:Listener(9090) { - // The `resource path` is `albums` and the `resource accessor` is `get`. - // The `.` represents the current resource that is `/info`. + // The `resource path` represents the relative path to the resource, and the `resource accessor` + // represents the HTTP method used to access the resource. + // Here, the resource path is `/albums`, and the resource accessor is `get`. + // This means the resource is invoked when an HTTP GET request is made to `/info/albums`. + // The `resource path` can be set as `.` to represent a resource with the `service path` + // that is `/info`. resource function get albums() returns Album[] { return albums.toArray(); }