How to access header values of request in Java Restlet?

前端 未结 5 1239
挽巷
挽巷 2021-01-13 20:23

I am developing web services using Restlet Java.

For this I want to protect some webservices from unauthorized clients. So I have written Filter cla

5条回答
  •  走了就别回头了
    2021-01-13 20:38

    How would you handle seeking to parse an ID in the GET header from a client request ? Would you approach this in the same manner ?

    Since the:

    Form headers = (Form) getRequestAttributes().get("org.restlet.http.headers");
    

    returns all the header information and

    String hID = headers.getFirstValue("Location");
    

    gets the location(s)

    How would you handle parsing out the ID ?

提交回复
热议问题