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 HTTP Requests Using Telnet

Why am I getting no response from my requests submitted to httpbin.org?

I open the workspace and click in front of treehouse:~/workspace$ to place my cursor.

I type "telnet httpbin.org 80" and receive "Trying Connected to httpbin.org. Escape character is '^]'."

I type either "GET / HTTP/1.1" or "GET /xml HTTP/1.1" and press enter to move my cursor to the next line.

I quickly type "Host: httpbin.org" and press enter expecting my screen to behave as Chris's does, but it moves my cursor to the next line, pauses briefly, and the displays "Connection closed by foreign host."

Am I doing something incorrectly or is there some other obstacle preventing my Workspace from operating as Chris's telnet request does?

1 Answer

Jason Anders
Jason Anders
Treehouse Moderator 145,627 Points

Hi Benjamin Masterman

There are a couple things to note here. First is that Telenet times out very quickly (~ 10 seconds), which is why he says "quickly type".

Second, you state that you hit enter after Host: httpbin.org and nothing happens, but his instructions say to hit enter twice.

Give that a try.

:) :dizzy:

Thanks Jason! You nailed it. I had assumed when he said press enter twice that he was including a reference to clicking enter from the line above. Clicking enter once drops my cursor to the next line, and pressing it once more on an empty line seems to be the key to actually sending the request. :D