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 trial

Development Tools HTTP Basics Introduction to HTTP Sending Data with a GET Request

Max Botez
Max Botez
5,146 Points

I cannot understand what exactly do I need to insert it?

Hi guys, I am stuck on this quiz. Not sure exactly what to do :(

get /books?get=firstname&type=paper - like this?

Tim Strand
Tim Strand
22,458 Points

you dont need to specify the get again. sb id?var=val&var=val etc for a valid query string

Max Botez
Max Botez
5,146 Points

still, I didn't get it :(

I specified as you said but something is wrong

I am stuck in the same question as you, it is obvious that the question needs rewording, I have no clue what put in it either.

2 Answers

David Lin
David Lin
35,864 Points

The first parameter is prefixed with a question mark (?), the values are separated with an equal sign (=), and other parameters are prefixed with ampersands (&) ...

Like this:

GET /books?type=kindle&sort=popular
Max Botez
Max Botez
5,146 Points

Thanks! But in case if you want to specify 3 or 4 parameters like a type sort availability and price. Can I do it like in this way?

David Lin
David Lin
35,864 Points

Max, just separate any other parameters with &, like this ...

GET /books?type=kindle&sort=popular&availability=true&price=10
Max Botez
Max Botez
5,146 Points

Aha! yes, I've got. Thanks a lot, David :)

David Lin
David Lin
35,864 Points

Sure thing, Max!