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 trialOlivier Van hamme
5,418 PointsI 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 :
"data": "firstname=Dorothy&language=Eng"
Notice how the original word — English — has been shortened to Eng .
1 Answer
Matt Coale
Full Stack JavaScript Techdegree Graduate 17,884 PointsI 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.
James Croxford
12,723 PointsJames Croxford
12,723 PointsI've just had the same issue here (Windows, using workspaces). I copied the input directly from the tutorial:
Like in your case, the query input is just cut down and accepted.