Eduardo
Eduardo

Reputation: 67

UWP app dont send request when use app package but in local machine work

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

Answers (1)

Iván
Iván

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

Related Questions