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 trialJoseph Acevedo
10,800 PointsWhy are we using POST?
I'm just curious as to why we're using the POST method to get data? I thought POST was only used to make changes to files that exist on that server?
Florian Tönjes
Full Stack JavaScript Techdegree Graduate 50,856 PointsI'd like to know this as well. It seems that GET would be more appropriate here, since no data is being modified.
Zhenghao He
Courses Plus Student 2,389 PointsI was wondering the same thing
Marie Nipper
22,638 PointsMarie Nipper
22,638 PointsI'm no expert, but my understanding is the GET request tells the server to send the said resource you're asking for.
But, the POST request in our instance says 'Server, take into account WHAT I am first sending you, then send me the appropriate resource back.'
With GET you're asking for data from some resource and POST you're submitting data to the server, then in our lesson, asking for a response based on what was sent.