Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lab 10 - Puppy REST #668

Open
alextmz opened this issue Sep 16, 2019 · 0 comments
Open

Lab 10 - Puppy REST #668

alextmz opened this issue Sep 16, 2019 · 0 comments

Comments

@alextmz
Copy link
Collaborator

alextmz commented Sep 16, 2019

Lab 10 - Puppy REST

  • Create directory 10_rest/USERNAME containing a copy of upstream master 09_json/USERNAME
  • Add file pkg/puppy/rest.go implementing:
GET    /api/puppy/{id}
POST   /api/puppy/          Payload: Puppy JSON without ID
PUT    /api/puppy/{id}      Payload: Puppy JSON without ID
DELETE /api/puppy/{id}
  • Use net/http/httptest for testing
  • Add flag -p PORT with long flag --port PORT to command line flags
  • Add flag -s STORE with long flag --store STORE with accepted values:
map, sync, db

Document the API in README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant