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.
Olivier Van hamme5,418 Points
I cannot replicate the 404 error in the video at [4:14] .
When I set the Content-Length to 30 characters — less than is required — I simply get a shortened data string back as a response instead of the 404 error :
Here is the original POST Request in the terminal on my Mac :
POST /post HTTP/1.1 Host: httpbin.org Content-Length: 30 firstname=Dorothy&language=English
After pressing enter , I get back the following response :
Notice how the original word — English — has been shortened to Eng .
I was getting the same results as you where the characters were getting cut off at 30 bytes. It makes sense, per the content-length that was set, but it's confusing versus watching the video.