Skip to content

Commit 5ad98cd

Browse files
committed
doc comment for curls
1 parent fc321f1 commit 5ad98cd

5 files changed

Lines changed: 10 additions & 0 deletions

File tree

go/samples/http/curls/delete.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# usage: delete.sh <id>
2+
13
curl --header "Content-Type: application/json" \
24
--request DELETE \
35
http://localhost:8080/todos/$1

go/samples/http/curls/index.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
# usage: index.sh
2+
13
curl http://localhost:8080
24
echo

go/samples/http/curls/insert.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# usage: insert.sh <task>
2+
13
curl --header "Content-Type: application/json" \
24
--request POST \
35
--data '{"task":"'$1'"}' \

go/samples/http/curls/list.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
# usage: list.sh
2+
13
curl http://localhost:8080/todos?search=$1
24
echo

go/samples/http/curls/update.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# usage: update.sh <id> <task>
2+
13
curl --header "Content-Type: application/json" \
24
--request PUT \
35
--data '{"task":"'$2'"}' \

0 commit comments

Comments
 (0)