Hi Adrian,

there is currently no way to exclude query parameters without values 
from the request URL. The URI RFC[1] doesn't require a value for each 
key, so it could be argued that your backend must be able to deal with 
these requests.

One thing you could do is define separate resources:

var description = {
   "get": { method: "GET", url: "/meetings?summary={summary}" },
   "getByDate": { method: "GET", url: 
"/meetings?summary={summary}&dateFrom={dateFrom}&dateTo={dateTo}" }
};

[1]http://tools.ietf.org/html/rfc3986#section-3.4


Regards,
Daniel

On 21.07.2013 16:34, Adrian wrote:
> Hi,
> J have one simple question about REST resource.
>
> I have defined resource with description: *{"search" : {method : "GET", url
> : "???"}}*
> My server side resource is defined to handle request:
> *../meetings?summary=&dateFrom=&dateTo=*
>
> How to define url param in the description to make proper call to my service
> ?
> When i try set:
> 1)    *../meetings?{summary,dateFrom,dateTo}* i get:
> ../meetings?{summary,dateFrom,dateTo}
> 2)    *../meetings?{summary,dateFrom,dateTo}* i get:
> ../meetings?A,2012-01-01,2013-01-01
> 3)    *../meetings?sumary={summary}&dateFrom={dateFrom}&dateTo={dateTo}* i 
> get:
> ../meetings?summary=&dateFrom=&dateTo=
>
> The third way is solution, but when i make call:
> resource.search({summary : "A"})
> I dont want to send empty dateFrom and dateTo params.
>
> Thanks for any advice.
> Adrian
>
>
>
>
> --
> View this message in context: 
> http://qooxdoo.678.n2.nabble.com/REST-resource-tp7584162.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to