Reputation: 67
I create a uwp that do a post request to my api, when i run in local machine works but when i create a app package and install and i send the request, nothing happens, anyone know why this happen or what i can do to resolve this?
Upvotes: 1
Views: 80
Reputation: 1060
To make a request to an API, you have to declare that capability in the manifest: https://learn.microsoft.com/en-us/windows/uwp/packaging/app-capability-declarations
In your case, it would be the "internetClient" capability, declared in the manifest this way:
<Package>
<!-- ... -->
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
<!-- ... -->
</Package>
For other permissions, like access to files, calls (In Windows Phone), etc, it's the same
Upvotes: 1