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!

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

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,855 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