Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBrendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsShould the HTTP method be ‘put’ for editing a category?
Just curious about when we use the other HTTP methods. It seems to be always POST or GET. I thought PUT was for updating a resource, which is what we seemed to be doing. Do some people just stick with POST and GET 100% of the time?
2 Answers
stjarnan
Front End Web Development Techdegree Graduate 56,488 PointsHi Brendan! I'm not sure if some people just stick to GET and POST, it's possible I suppose. But to answer your question, if you want to edit and replace something, PUT is what you want.
Here is a link if you would like to read more: http://www.restapitutorial.com/lessons/httpmethods.html
J llama
12,631 Pointswhat a horrible tutorial lol has us not using put for editing db data
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsBrendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsThat's an awesome resource, thanks.