I am running Restful web service on 8182 port using restlet framework. I am trying to authenticate user to hit the service. i.g.
I have a query string like this http://localhost:8182/api/service/customers/?key=“XXXXXXXXX”
My doubts are:
-
How to get value of parameter key in Resource class/Application class, so i can authenticate user upon key through my custom database.
-
I don’t have any client code for my restful service, since i want to invoke all call from browser itself. so please tell me,how to send post data from browser itself. since i want to use post/put method to add new customer data.
I am using restlet framework 1.1.
Thanks in advance.
Karunjay Anand
As Bruno pointed out, you can obtain a
Forminstance to access the request’s query parameters:If you want to use the
POSTmethod from the browser itself, I would recommend you use one of the following add-on/extensions:Firefox – REST Client
Google Chrome – Simple REST Client