question

NexplayerTest-2834 avatar image
NexplayerTest-2834 asked ·

[UWP] Xbox Device Portal REST API - POST /ext/app/deployinfo allways responding 405 - Method not allowed with Javascript

I have a simple one html and main.js project. When the projects launches the script to create the request is also launched but we get a "405 - Method not allowed" response. We are trying this https://docs.microsoft.com/en-us/windows/uwp/xbox-apps/uwp-deployinfo-api API endpoint however we have tryed with other endpoints and we get 500 or again 405 errors.
The request is this one:
fetch('/ext/app/deployinfo', {
method: 'POST',
body: JSON.stringify({'DeployInfo': {'PackageFullName': 'xxxxxxxx-xxxx-xxxx-xxxxxx'}})
})
.then(
function (response) {
if (response.status !== 200) {
console.log('--- Petition Failure ---');
console.log('Status Code: ' + response.status);
return;
}
response.json().then(function (data) {
console.log('--- Petition Success ---');
console.log('Status Code: ' + response.status);
});
}
)
.catch(function (err) {
console.log('Fetch Error :-S', err);
});

We have also tried changing this same endpoint changing the method and we get a 500 error. Has someone tested this API? Thanks!

windows-uwp
2 comments
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

May I know the version of your xbox device and your projects?

0 Votes 0 · ·

Can you get the Response body from the 405? it might have a detail message that gives more detail. In addition, you could try to use Windows Device Portal from a browser with the F12 tools active, looking at the Networking tab for a call to ext/app/deployinfo and see if they can find any differences between a successful call there and their failing call.

0 Votes 0 · ·

0 Answers