proxy” the HTTP requests using native code, so CORS can be completely bypassed

proxy” the HTTP requests using native code, so CORS can be completely bypassed

Exist possibility of implement or configure CORS in the server.    currently i've been had the follow problem: 

Access to XMLHttpRequest at 'https://inventory.zoho.com/api/v1/items' from origin 'http://localhost:8100' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

i've tried several thing in the client.   por example: 

var headers = new Headers();
    headers.append('Access-Control-Allow-Origin' , '*');
    headers.append('Access-Control-Allow-Methods', 'POST, GET, OPTIONS, PUT');
    headers.append('Accept','application/json');
    headers.append('content-type','multipart/form-data');
    

  this.http.get(url, { headers: headers, withCredentials: true}).subscribe(res => {
    //alert(res);
    alert(JSON.stringify(res));
  },
  (error) => {
            
            alert(JSON.stringify(error));
            
        });
}

Someone recommendation me:

there is a native plugin that can “proxy” the HTTP requests using native code, so CORS can be completely bypassed:

Read more here: cordova-plugin-http.


The problem with this solution is than that plugin not work with form-data for send the JSON of the APIs


    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now