[aerogear-dev] [Doc] AerogearAndroidPipes101

Daniel Passos daniel at passos.me
Mon Jun 3 09:44:46 EDT 2013


Sebastien Blanc wrote:
>
> On Sat, Jun 1, 2013 at 3:56 PM, Apostolos Emmanouilidis
> <aemmanou at redhat.com <mailto:aemmanou at redhat.com>> wrote:
>
>     __
>
>     On Sat, 2013-06-01 at 11:45 +0200, Matthias Wessendorf wrote:
>>     Hi,
>>
>>     reading [1], I have two questions:
>>
>>     * the "http://www.server.com/car" URL, shouldn't it be
>>     "http://www.server.com/cars" (plural)?
>>     ==> and the later mentioned HTTP methods, e.g. "GET:/car" ==>
>>     "GET:/cars"?
>
>     I agree that it should be plural
>
>>     * Do we really promote the direct access to the RestAdapter,
>>     instead of via the Pipeline ?
>>     ==> Pipe<Car> pipe = new RestAdapter<pipe>(Car.class, new
>>     URL("http://www.server.com/"));
>>
>
>     Except that, maybe this line should change to Pipe<Car> pipe = new
>     RestAdapter<*Car*>(Car.class, new
>     URL("*http://www.server.com/car*")); in order to match the URLs of
>     the described web service.
>
> I don't know the android details implementation but if we define the URL
> like and we call a read after that like pipe.read() won't we end up with
> an url like that *http://www.server.com/car/car ? *

No! When you create a pipe from Pipeline, it's automatic append entity 
class (or endpoint if you used PipeConfig.setEndpoing()) on baseURL and 
pass appended url to RestAdapater. If you directly use RestAdapater will 
not be append on URL



More information about the aerogear-dev mailing list