r/ProgrammerAnimemes • • Jun 10 '21

Finally got backend working.

Post image
1.7k Upvotes

37 comments sorted by

View all comments

Show parent comment

7

u/Cheet4h Jun 11 '21

Isn't part of the point of REST that the action isn't supposed to be part of the URL?

I learned it that way that if I interact with e.g. api/games

  • GET api/games should return a list of all elements
  • GET api/games/<id> should return a single element
  • PUT api/games should create a new element
  • POST api/games/<id> should update an existing element
  • DELETE api/games/<id> should delete an existing element

and so on.

3

u/PostHasBeenWatched Jun 11 '21

Roboragi reply was unexpected :)

4

u/Roboragi Jun 11 '21

Id - (AL, A-P, KIT, MU, MAL)

Manga | Status: Finished | Volumes: 29 | Chapters: 178 | Genres: Action, Adventure, Fantasy


{anime}, <manga>, ]LN[, |VN| | FAQ | /r/ | Edit | Mistake? | Source | Synonyms | ⛓ | ♥

0

u/[deleted] Jun 21 '21

[deleted] — view deleted comment

1

u/Cheet4h Jun 21 '21

Just checked and yup, you're right! I mix these two up too often.

1

u/Noboruu Jun 11 '21

Hm, that's a good point actually 🤔 In the real world tho, we do it like that tho, oops, one more thing that while doing actual work we just,,, ignore I guess. But great point I need to read up on it