I am migrating my apps away from jQuery - mainly due to performance reasons.
the last leftover are the
To make a request via
XMLHttpRequest is not the issue, but NC is expecting the
Can you help me on how to derive this ans pass it along with the Request?
just found the following in an app:
var xhr = new XMLHttpRequest();
do I miss anything?
OC.requestToken would be the way to go for that, so the snipped should work fine. In case you are using some kind of bundler for your vanilla js app you can also just use our https://github.com/nextcloud/nextcloud-auth npm package for obtaining the token.