PLEASE READ REPLY!
Hey guys! So I am currently trying to fetch the json data from “https://mycloud/ocs/v2.php/apps/serverinfo/api/v1/info” however I fail to do so via a script.
const got = require("got");
const options = {
method: 'POST',
url: 'https://username:password@mycloud/ocs/v2.php/apps/serverinfo/api/v1/info?format=json'
};
console.log("Connecting....")
got(options).then(response => {
console.log("Connected!")
... stuff that never happens anyways so I left it out
If I try a get request I get a 401 and if I do a post I get a 405. can anyone tell me why and how to properly fetch the data from that endpoint in js? I couldnt find any docs for it.
Appreciate everyones answer