B4J Question jServer: Get all headers (in a map?)


Active Member
Licensed User

Is is possible to retrieve all headers from a ServletRequest?
Now we only can get the value if we supply the name as string via the GetHeader method.

Would be nice to even get it in a Map, just like the ParameterMap for Query Parameters.

It seems possible in Jetty when a ServerletRequest is casted to a HTTPServletRequest: https://stackoverflow.com/questions...ow-to-get-all-the-headers-from-servletrequest

But I have no idea how to cast that in Java, as a HTTPServelRequest doesn't exist in B4J.

Thanks for any help
Last edited: