title: How to solve Http POST 403 (Forbidden) in Ionic 2
body: <p>I am Beginner in Ionic 2. I want to make user registration from the app .For user registration, i am using API which METHOD is POST and its media type is x-www-form-urlencoded. I want to send data to the server .</p>
  
  <p>But when I am trying using   <strong>IONIC serve</strong> its worked fine on the web browser but when I am trying to send data from actual device its give me <strong>403 forbidden error</strong> </p>
  
  <p>This is my code</p>
  
  <pre><code> doLogins() {
   this.loading = this.loadingController.create({content : "Registering user ..."});
        this.loading.present()
        var url = 'http://services/Registration';
  
        var officername = this.data.username.trim();
          var officenmae = this.data.office.trim();
          var emal=this.data.email.trim();
          var mobileno=this.data.contact.trim();
          var areode =this.data.areacode;
  
          var lanlineno=this.data.telno.trim();
          var desgnation= this.data.designation.trim();
          var password=this.data.password.trim();
          var status='A'
  
  
       var headers = new Headers()
        headers.append('Content-Type', 'application/x-www-form-urlencoded');
  
         headers.append('Access-Control-Allow-Origin' , '*');
         headers.append('X-HTTP-Method-Override', 'POST');
         headers.append('Access-Control-Allow-Headers', 'X-Requested-With, X-
       let options = new RequestOptions({ headers: headers });
  
  
  
      let body =  "officname=" +offername + "&amp;emiled=" + email + "&amp;mobilenumber=" + mobileno + "&amp;password=" + password + "&amp;offiname=" + officenmae + 
      "&amp;designation=" + designation +"&amp;landnecode=" + areaode +"&amp;landlinnumber=" + lanlineno +"&amp;status=" + 'A';
  
  
             return new Promise(resolve =&gt; {
              this.http.post(url, body, options) .map(res =&gt; res.json()).subscribe(
                             data =&gt; {
                               console.log(data);
  
                               let toast = this.toastCtrl.create({
                                message: "Registration Success",
                                duration: 3000,
                                position: 'top'
                              });
                              toast.present();
                              setTimeout(() =&gt; {
                                this.loading.dismissAll();
                                this.navCtrl.push(LoginPage,{
                                  param1: email, param2: password
                              });;
                              }, 2500);
  
                             },
                             err =&gt; {
                               alert(err);
                               this.loading.dismissAll();
                             }
                         );  
           });        
        }
  </code></pre>
  
  <p>Please Suggest me where I am doing wrong. Thanks</p>