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.

Development Tools HTTP Basics GET and POST Requests in a Browser Using Forms for GET Requests

kuolun Huang
kuolun Huang
3,956 Points

Form method in the lecture

I notice that around 02:00 in the lecture the form use POST method <form method="post"

But later the demo on java.com , it uses GET method

What's the difference??

Daniel Petrov
Daniel Petrov
3,495 Points

The first type of form shown relates more to the next video where you actually use the POST method. Where the second form(java.com) is a search field/form that uses the GET request method. I think there is aslo a mistake in the following quiz question that asks about POST method before you have actually seen the video about it.

1 Answer

36,121 Points

After you post the form, the client will get the result. All the web pages you can see in the browser are what by GET, otherwise, you can't get anything through the browser. The POST is just before the GET request.