- Building RESTful Web services with Go
- Naren Yellavula
- 89字
- 2021-07-02 20:14:07
Running the code
Let us fire a CURL request and see what the response is for various routes:
go run customMux.go
Now, fire up a shell or browser to see the server in action. Here, I use the CURL request:
curl -X GET http://localhost:8000/
The response is:
Your random number is: 0.096970
Use Ctrl + C or Cmd + C to stop your Go server. If you are running it as a background process, use pgrep go to find the processID and kill it using kill pid.
推薦閱讀
- Application Development with Qt Creator(Second Edition)
- Building Django 2.0 Web Applications
- Twilio Cookbook
- INSTANT PhpStorm Starter
- 數字調制解調技術的MATLAB與FPGA實現:Altera/Verilog版(第2版)
- The Kubernetes Workshop
- 網絡環境中基于用戶視角的信息質量評價研究
- 網絡設計與應用(第2版)
- 5G技術與標準
- React Cookbook
- 大型企業微服務架構實踐與運營
- 計算機網絡技術
- Web用戶查詢日志挖掘與應用
- 網絡安全之道
- Hands-On Reactive Programming in Spring 5