# How to use community HTTP plugin in Ionic React when running the app on Android Studio?

**URL:** <https://forum.ionicframework.com/t/how-to-use-community-http-plugin-in-ionic-react-when-running-the-app-on-android-studio/210172>\
**Category:** Ionic Framework\
**Created:** [May 27, 2021, 8:17am UTC](https://forum.ionicframework.com/t/how-to-use-community-http-plugin-in-ionic-react-when-running-the-app-on-android-studio/210172 "2021-05-27T08:17:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ani4](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Ani4](https://forum.ionicframework.com/u/Ani4)\
**Post date:** [May 27, 2021, 8:17am UTC](https://forum.ionicframework.com/t/how-to-use-community-http-plugin-in-ionic-react-when-running-the-app-on-android-studio/210172/1 "2021-05-27T08:17:03Z")

</div>

I’m working on an Ionic React App running on top of Capacitor. It works fine with axios requests in browser, but on Android I have CORS issues, that’s why I’m using the community HTTP plugin: [GitHub - capacitor-community/http: Community plugin for native HTTP](https://github.com/capacitor-community/http)

I click for example on my Login button. My data such as email and password are supposed to be sent via HTTP post, but it catches the error I have put there: Try again’ .  
**Do you have any idea why it might happen?**

No error logs regarding the request on Android Studio either. Only these:

> /system\_process E/ClipboardService: Denying clipboard access to com.google.android.googlequicksearchbox, application is not in focus nor is it a system service for user 0  
> E/netmgr: qemu\_pipe\_open\_ns:62: Could not connect to the ‘pipe:qemud:network’ service: Invalid argument  
> E/netmgr: Failed to open QEMU pipe ‘qemud:network’: Invalid argument  
> E/wifi\_forwarder: qemu\_pipe\_open\_ns:62: Could not connect to the ‘pipe:qemud:wififorward’ service: Invalid argument  
> E/wifi\_forwarder: RemoteConnection failed to initialize: RemoteConnection failed to open pipe

To solve these errors I have added this setting inside **application** element:

> android:usesCleartextTraffic=“true”

but the errors still occur.

**Login function:**

> const doLogin = async (e: any) =\> {
> 
> ```
> e.preventDefault();
> 
> const loginData = {
> 
> email: eMail,
> 
> password: password,
> 
> };
> 
> //https://github.com/capacitor-community/http
> 
> const options = {
> 
> url: "https://xx/login,
> 
> data: loginData,
> 
> };
> 
> const response: HttpResponse = await Http.post(options)
> 
> .then((response) => {
> 
> if (response.data.token) {
> 
> history.push("/home");
> window.location.reload();
> }
> return response.data;
> })
> 
> .catch((error) => {
> 
> setMessage(
> 
> "Try again!"
> );
> 
> });
> 
> };
> 
> ```

I’m stuck with this issue since 3 days so any help would be really really appreciated. Thank you!

---

<div class="post-metadata">

**Author:** ![Ani4](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Ani4](https://forum.ionicframework.com/u/Ani4)\
**Post date:** [May 28, 2021, 11:00am UTC](https://forum.ionicframework.com/t/how-to-use-community-http-plugin-in-ionic-react-when-running-the-app-on-android-studio/210172/3 "2021-05-28T11:00:43Z")

</div>

I solved this issue, using capacitor community http plugin: [GitHub - capacitor-community/http: Community plugin for native HTTP](https://github.com/capacitor-community/http) . There is a lack of info here, but anyone is interested can reply to this comment.
