_examples

command
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2019 License: MIT Imports: 5 Imported by: 0

README

Examples

$ go run main.go
# GET index
curl -D - \
  -XGET 'http://localhost:9393/'

# GET articles
curl -D - \
  -XGET 'http://localhost:9393/articles'

# POST new article
curl -D - \
  -H'Content-Type: application/json' \
  -XPOST 'http://localhost:9393/articles' \
  -d'{"title":"Hello","pubDate":"2019-09-01"}'

# GET article
curl -D - \
  -XGET 'http://localhost:9393/articles/1'

# PATCH article
curl -D - \
  -H'Content-Type: application/json' \
  -XPATCH 'http://localhost:9393/articles/1' \
  -d'{"title":"Hello, World"}'

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL