Unsupported Media type while calling the webapi in ionic2

Hi,

I am getting error Unsupported Media Type error.
Previously the same code is wokring but not now I am not sure what goes wrong it is not working.
Below is my code:

import {Injectable} from ‘@angular/core’;
import {Http} from ‘@angular/http’;
import ‘rxjs/add/operator/map’;

/*
Generated class for the WebConfig provider.

See https://angular.io/docs/ts/latest/guide/dependency-injection.html
for more info on providers and Angular 2 DI.
*/
@Injectable()
export class WebConfig {
static get parameters(){
return [[Http]]
}

constructor(http) {
this.http = http;
this.data = null;
this.baseUrl = “http://mobileapp.zapklaar.nl/api/sync/”;
this.apiCallType = {
postFormData: “PostFormData”,
pull: “Pull”,
push: “Push”
};
}
convertToUrlEncoded(value) {
let i = 0;
let temp = “”;
for (let v in value) {
let foo;
if (typeof value[v] === “object”) {
foo = encodeURIComponent(JSON.stringify(value[v]));
alert("convertToUrlEncoded " + JSON.stringify(value[v]));

  } else {
    foo = encodeURIComponent(value[v]);
  }
  console.log(foo);
  if (Object.keys(value).length - 1 == i) {
    temp = temp + v + "=" + foo;
  } else {
    temp = temp + v + "=" + foo + "&"
  }
  i++;
}
return temp;

}

apiCall(type, value) {
alert(this.baseUrl + type);
return new Promise((resolve, reject) => {
this.http.post(this.baseUrl + type, this.convertToUrlEncoded(value), {
“headers”: {
“Content-Type”: “application/x-www-form-urlencoded”
}
})
.map(res => res.json())
.subscribe(data => {
alert(“WebConfig data” + data);
resolve(data);
console.log(data);
},
err => {
alert(“WebConfig” + err);
console.log(err);
reject(err);
});

});

}
}

Does anybody has encounter the same problem please let me know. I have tried changing content type too.