HTTP POST & GET requests to REST API: 403 triggered by XContentProvider queryContent

Hello,

I implemented macros to integrate to an API REST platform base on this code: OOoBasic/Generic/HttpRequest - ...?.

As I have to provide access token to the API I used this listener “com.sun.star.ucb.XWebDAVCommandEnvironment” to implement _getUserRequestHeaders function.

All works fine except that first call to an URL is facing a 403 (access denied) error when queryContent function is called. It appears that queryContent is triggering an HTTP OPTIONS followed by an HTTP HEAD requests without setting the token in the HTTP header parameters while the execute function call does it through the _getUserRequestHeaders function.

What would be the way to have the queryContent function passing access token in the HTTP HEAD request? Is there a dedicated listener that could be used ?

Thank you for your help