Skip to content

Commit 885be58

Browse files
readme update for api call sample
1 parent c4ba346 commit 885be58

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,16 @@ cd simple-http-server
88
go run server.go
99
1010
````
11+
12+
# to call api endpoint in postman
13+
14+
```
15+
for gin-server
16+
http://localhost:3000
17+
18+
for simpe-http-server
19+
http://localhost:3000
20+
21+
http://localhost:3000/headers
22+
23+
```

simple-http-server/server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func headers(w http.ResponseWriter, req *http.Request) {
2121

2222
func main() {
2323

24-
http.HandleFunc("/hello", hello)
24+
http.HandleFunc("/", hello)
2525
http.HandleFunc("/headers", headers)
2626

2727
http.ListenAndServe(":3000", nil)

0 commit comments

Comments
 (0)