Hi Folks,

I am newbie to restlet. I am using restlet 1.1.1  and i have to set some non
standard custom headers 

                        Request request = new Request(Method.POST, url, 
represent);
                        Map<String, Object> requestAttrib = 
request.getAttributes();
                        Form headers =(Form) 
requestAttrib.get(RESTLET_HTTP_HEADERS);
                        
                                if(headers == null){
                                        headers = new Form();
                                        requestAttrib.put(RESTLET_HTTP_HEADERS, 
headers);
                        }
                                headers.add("appID", "abc");
                                headers.add("timestamp", timeStamp);
                                headers.add("accessKey", "key");
                        Response response = new 
Client(Protocol.HTTP).handle(request);



when i test this i get java.lang.IllegalArgumentException: Only HTTP or
HTTPS resource URIs are allowed here
        at
com.noelios.restlet.ext.httpclient.HttpMethodCall.<init>(HttpMethodCall.java:153)
        at
com.noelios.restlet.ext.httpclient.HttpClientHelper.create(HttpClientHelper.java:150)
        at
com.noelios.restlet.http.HttpClientConverter.toSpecific(HttpClientConverter.java:493)
        at
com.noelios.restlet.http.HttpClientHelper.handle(HttpClientHelper.java:106)
        at org.restlet.Client.handle(Client.java:157)
        at org.restlet.Uniform.handle(Uniform.java:108)

please help me out

--
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/Custom-headers-in-restlet-1-1-1-tp6484371p6484371.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2767481

Reply via email to