# Ionic capacitor build can't request HTTP when build

**URL:** <https://forum.ionicframework.com/t/ionic-capacitor-build-cant-request-http-when-build/237659>\
**Category:** Ionic Native\
**Created:** [November 12, 2023, 11:13pm UTC](https://forum.ionicframework.com/t/ionic-capacitor-build-cant-request-http-when-build/237659 "2023-11-12T23:13:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NotMeCJ](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@NotMeCJ](https://forum.ionicframework.com/u/NotMeCJ)\
**Post date:** [November 12, 2023, 11:13pm UTC](https://forum.ionicframework.com/t/ionic-capacitor-build-cant-request-http-when-build/237659/1 "2023-11-12T23:13:20Z")

</div>

Hi everyone,

I encounter something annoying, I have a small app i want to build on an Android Device.  
Using this on browser (ionic serve) or livereload (ionic capacitor run android -l --external) it works fine but when i build directly with Gradle or generating an APK. This is not working at all.

```auto
var headersA = new HttpHeaders;
  
 headersA.append("Accept", 'application/json');
    headersA.append("Access-Control-Allow-Origin", "*")
    const httpOptions = {
      headers: headersA
    };
this.http.put('http://192.168.1.250/api/ebx/x8r/4259840?', data, httpOptions).subscribe(d => () => { })

```

Adding these modifications didn’t work as well:

```auto
<application
        android:networkSecurityConfig="@xml/network_security_config"
...

```

or creating a network\_security\_config.xml with

```auto
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
  <domain-config cleartextTrafficPermitted="true">
    <domain includeSubdomains="true">192.168.1.250</domain>
  </domain-config>
</network-security-config>

```

Did someone encountered the same problem or is there any quick fix for that ?
