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
Justin Cantley
18,068 PointsWhy does get work but not post?
When I assign get to the method attribute of my form the data is submitted successfully, but if I try to assign post to the method attribute I receive a message that tells me 'cannot POST'. Why is this?
Here is the link to my project: https://github.com/JustCant/FormProject
1 Answer
Steven Parker
243,228 PointsWhat are you submitting it to (what kind of server)? And are you actually connected to a server with a browser, or are you running on some kind of editor/simulator?
Justin Cantley
18,068 PointsJustin Cantley
18,068 PointsThe form submits data to another page that is part of the project called success.html. To be honest I don't have a full understanding of post and get so I'm not sure if what I'm trying to do makes sense or not.
Steven Parker
243,228 PointsSteven Parker
243,228 PointsWhen you work with the form, what is it you are running? Is it a browser?
Justin Cantley
18,068 PointsJustin Cantley
18,068 PointsYes. I'm using brackets text editor and running the page on chrome.
Steven Parker
243,228 PointsSteven Parker
243,228 PointsSo "brackets" is acting as the server then. I'm not familiar with it myself, but since "post" requires handling by the server, it's possible that it doesn't support that function, or needs some special configuration before it will.
Justin Cantley
18,068 PointsJustin Cantley
18,068 PointsOk I see. I'll look more into that. Thank's for the input!