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 trial

JavaScript AJAX Basics (retiring) AJAX Concepts Review HTTP Methods

Nick Retel
Nick Retel
Courses Plus Student 4,516 Points

But what if the form contains an email and / or a password.

Then you should definitely use POST imo. Not a great question imo.

1 Answer

Hey Nick,

Are you talking about the question: "When should you use the POST HTTP method with AJAX?"

The options were:

A) Every time you submit information from a form

B) When you want to send data that the web server should store in a database

C) When you want to spend more than 2083 characters of data to the web server

D) All of the above

E) Answers B and C only

You are correct in saying that if the form contains personal or authentication information the HTTP method should be POST. But quite frequently forms will not contain any personal or authentication data. Think search boxes and filter inputs for example. This is why answer A is incorrect. The POST HTTP method is not always required as forms do not always contain sensitive information.