Answers for "ionic post The Content-Type header is: application/x-www-form-urlencoded"

0

ionic post The Content-Type header is: application/x-www-form-urlencoded

doLogin() {
   let url = "http:////Registration";

  var headers = new Headers()
   headers.append('Content-Type', 'application/x-www-form-urlencoded');

  let options = new RequestOptions({ headers: headers });

   let body= JSON.stringify({ officme: 'mr',emled:'adminac.com', mobilenumber:'9025225',
    password:'12345',offm:'mrc',desigtion:'prrammer',landlinecode:'0000',
   landlinenumber:'888888',status:'A'});
   alert(body);


  return this.http.post(url, body, options) .map(res => res.json()).subscribe(
              data => {
                console.log(data);
              },
              err => {
                console.log("ERROR!: ", err);
              }
          );
        }
      }
Posted by: Guest on June-28-2021

Code answers related to "ionic post The Content-Type header is: application/x-www-form-urlencoded"

Browse Popular Code Answers by Language