https://github.com/billsjc/go-http-study
a sample to use net/http package in golang
https://github.com/billsjc/go-http-study
Last synced: 3 months ago
JSON representation
a sample to use net/http package in golang
- Host: GitHub
- URL: https://github.com/billsjc/go-http-study
- Owner: BillSJC
- Created: 2019-05-06T17:19:09.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-12T16:45:24.000Z (about 6 years ago)
- Last Synced: 2025-01-13T10:50:04.222Z (5 months ago)
- Language: Go
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# go-http-study
Some sample of package `net/http`
## Requirement
- Go:`1.11+`
Recommend:
- Go:`1.12.4 or higner`
- IDE:`GoLand`
- CGO:`Disabled`## Index
### Quick start
a base use of package http
### Get UA
try to get User-agent(a kind of header in HTTP Request header)
and now , u should use some methods(`recover`)to keep your service up
### Return time
a sample show you how to return a JSON object include time info
### Gin start
a sample show the init of gin framework
more details, please view gin\`s doc [gin-gonic/gin](https://github.com/gin-gonic/gin) or [godoc](https://godoc.org/github.com/gin-gonic/gin)