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 Introduction to HTTP Sending Data with a POST Request

Hamzah Iqbal
Hamzah Iqbal
Full Stack JavaScript Techdegree Student 11,145 Points

How to get correct HTTP request - Content length

I am trying to get the HTTP request on the challenge. I have used two methods. On the command line, i type in

telnet example.com 80

Then it waits, Then i type GET

   HTTP/1.0 501 Not Implemented                                                                                                                                             Content-Type: text/html                                                                                                                                                     Content-Length: 357                                                                                                                                                         Connection: close                                                                                                                                                           Date: Thu, 09 Jul 2020 15:27:54 GMT                                                                                                                                         Server: ECSF (nyb/1D0C)                                                                                                                                                                                                                                                                                                                                 <?xml version="1.0" encoding="iso-8859-1"?>                                                                                                                                                                            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"                                                                                                                                                                                     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">                                                                                                                                                                            <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">                                                                                                                                                                                 <head>                                                                                                                                                                                      <title>501 - Not Implemented</title>                                                                                                                                                                                </head>                                                                                                                                                                             <body>                                                                                                                                                                                      <h1>501 - Not Implemented</h1>                                                                                                                                                                                  </body>                                                                                                                                                                            </html>                         

No connection to the host                                                                                                                     

I tried using an online version of sending the request, however nothing really works.

I used the GET request too and that is the wrong answer.