ccmiko / next-playground

nextであれこれ検証したいとき用

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

next-ployground

nextであれこれ検証したいとき用

apiのcurlでテスト例

# get
curl -XGET "http://localhost:3000/api" -H "key: value"

# get with query string
curl -XGET "http://localhost:3000/api?test=test" -H "key: value"
curl -XGET "http://localhost:3000/api" -H "key: value" -G -d test=test -d test2=test2

# post with body
curl -XPOST "http://localhost:3000/api" -H "key: value" -d '{"test": "test"}'

# post with body and query string
curl -XPOST "http://localhost:3000/api?test=test" -H "key: value" -d '{"test": "test", "test2": 1, "test3": false}'

About

nextであれこれ検証したいとき用


Languages

Language:TypeScript 95.4%Language:CSS 3.5%Language:JavaScript 1.1%