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

Android

Can i create ONE url for multiple API calls?

I am using the SLIM Framework to create a RESTful API that gets data from my database and is displayed on my android app. On my android app, i have a search box where a user can search for an item, and the results are returned in a list view.

My httpGET uses ONE URL: HttpGet httpGet = new HttpGet("http://10.0.3.2/demoapp/products"); but i have created 4 for example:

http://localhost/demoapp/products http://localhost/demoapp/products/manufacturer/:manufacturer http://localhost/demoapp/products/standard/:standard http://localhost/demoapp/products/category/:category

Is there a way that i can link all 4 of the routes above to one URL? [i hope that makes sense]