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 GET Request

Kevin Veerasammy
Kevin Veerasammy
7,786 Points

HTTP request: Fill in the missing symbols of the query string in the request line of the following HTTP request:

Hi All, I am struggling with this problem here..

GET /books___type_kindle___sort=popular HTTP/1.1

Host: amazon.com Accept-Language: en-US

i placed in /books?name=value1&type=value2&kindle=true&

and im getting incorrect. not too sure how to solve this. Help!

4 Answers

Michael Afanasiev
PLUS
Michael Afanasiev
Courses Plus Student 15,596 Points

We search for books with ? the type needs to be equal = to kindle, and & we have to sort it by popularity. Basically it should be GET /books?type=kindle&sort=popular HTTP/1.1

Amal Shanker
Amal Shanker
7,176 Points

Thanks for providing the context Michael

Thank You Michael

thank you for the answer. Was this covered in the video? I don't recall it?

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,631 Points

Hey Kevin,

For this quiz, the first blank get the question mark (?). As this will start the GET request.

The second blank gets the equal sign (=), because it needs to know what the 'type' is equal to.

The final blank gets the ampersand (&), because it is adding additional parameters.

Hope that helps. :dizzy:

Kevin Veerasammy
Kevin Veerasammy
7,786 Points

Appreciate the help Jason! Thank you!

Michael Afanasiev
PLUS
Michael Afanasiev
Courses Plus Student 15,596 Points

Hi Kevin,

You only need to put the operators ? = & in their correct places.

Kevin Veerasammy
Kevin Veerasammy
7,786 Points

Hello Michael,

So basically.. /books?=&type=&kindle=&sort=popular HTTP/1.1 ?

I tried this.. still nothing :(

Kevin Veerasammy
Kevin Veerasammy
7,786 Points

totally confused and lost. I know its /get?resource=value1&resource2=value2&resource3=value3 But i tried that format it is not working.

Kevin Veerasammy
Kevin Veerasammy
7,786 Points

WOW THAT SIMPLE!! THANKS MICHAEL! YOU ARE THE BEST!!!! I was wrestling with this all morning!!

Michael Afanasiev
Michael Afanasiev
Courses Plus Student 15,596 Points

Haha don't worry Kevin, I was struggling with this one too at first! Glad I could help you out!