Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Build a Simple Dynamic Site with Node.js Creating a Simple Server in Node.js Preparing & Planning

Joseph Acevedo
Joseph Acevedo
10,800 Points

Why 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?

Marie Nipper
Marie Nipper
22,638 Points

I'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.

I was wondering the same thing