回聲服務

回聲服務

簡單

說明

在 Ballerina 中建立服務很簡單。現在你可以加上查詢參數和相對路徑。

目標

  • 修改提供的程式碼。
  • 它應該有一個 echo 端點,回傳查詢參數sound的值。服務應該回應路徑/echo?sound=hello的 GET HTTP 請求。
  • 它應該有另一個端點,用來定義「echo」這個詞,回傳字串"A sound or series of sounds caused by the reflection of sound waves from a surface back to the listener."。服務應該回應路徑/echo/definition的 GET HTTP 請求。
透過 GitHub 編輯 連結會在新視窗或分頁中開啟
Ballerina Exercism

準備好開始 回聲服務 了嗎?

註冊 Exercism,透過 60 個練習 和真人引導來學習並精通 Ballerina,全部免費。