Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cf-dev] Californium CoAP path parameters

Hi Yasith,

there is no way of doing this in the same way you are probably used to when using SpringMVC or some other full fledged REST framework. In particular, you cannot define URI path elements as parameters by simply putting them in curly parenthesis. However, you can implement your resource's Resource.getChild(String) method to return e.g. itself in order to implement a resource handling a wildcard URI like /myresource/{param}. You can then retrieve the last path element (the {param}) and process it accordingly ...

Kai

On Tue, Jul 14, 2015 at 10:12 AM Yasith Lokuge <yasith1@xxxxxxxxx> wrote:
can anyone please help me regarding the above mentioned problem?

On Mon, Jul 13, 2015 at 9:29 PM, Yasith Lokuge <yasith1@xxxxxxxxx> wrote:

Hi,

I'm working on a CoAP application using Eclipse Californium and I need to pass parameters using the URL as we do in restful web services. Is it possible to do it in californium coap implementation, and if so please let me know how to do it. 

ex:

coap://localhost:5683/foo/{fooID}


--
Regards,
-Yasith Kanchana Lokuge-





--
Regards,
-Yasith Kanchana Lokuge-

 

Engineer - Technology | Virtusa (Pvt.) Ltd.


Mobile     : +94771353682 
Skype      : yasith11
Twitter    : @YasithLokuge
_______________________________________________
cf-dev mailing list
cf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cf-dev

Back to the top