Skip to content

Comments

Laboratorio 6 (sergio) feat: add student API service with GET and POST#24

Open
Sergio777gg wants to merge 1 commit intoAlonza0314:mainfrom
Sergio777gg:feature/student-api
Open

Laboratorio 6 (sergio) feat: add student API service with GET and POST#24
Sergio777gg wants to merge 1 commit intoAlonza0314:mainfrom
Sergio777gg:feature/student-api

Conversation

@Sergio777gg
Copy link

This pull request implements the Lab 6 task for nf-example.

Changes:

  • Added a new /student API group following the existing NF structure.
  • Implemented GET /student/:id endpoint that returns basic student information in JSON.
  • Implemented POST /student/ endpoint that receives {"id","name"} in JSON and returns the created student.

Testing:

  • make
  • ./bin/nf -c config/nfcfg.yaml
  • curl -X GET http://127.0.0.163:8000/default/
  • curl -X GET http://127.0.0.163:8000/student/123
  • curl -X POST http://127.0.0.163:8000/student/ -H "Content-Type: application/json" -d '{"id":"1","name":"Sergio"}'

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 this pull request may close these issues.

1 participant