not performing action

So I am trying to pass a json object to my rest api which in turn will decode it and store it in my mysql database. The problem I am facing is that when I use the function it does not pass my data or make the call to the site. I threw in a few console.logs so I know it is reaching the function but it is not getting past the post call.

I have tested it on my api side and it adds new data to the database when I pass in data through Chrome Poster so I do not believe the issue is there, plus I have echos in my api that will send messages confirming that a new entry was created or not.

I can oddly see those echos in my console when I use a http.get on my post url as well when I use an http.get on the post url it adds a new entry into my database. I am wondering if it may be an issue with my headers or if I am just using incorrectly.

Here is where I make the call. Data is an object made of data from user input.

  newAlert(data) {

    let myheaders = new HttpHeaders({
      'Content-Type': 'application/json'
    console.log("in new alert prior to post");
    return new Promise(resolve => {'/alerts/create.php', data, {headers: myheaders})
      .map((response: Response) => {
        console.log("in response");
        return response.json();

Can you show the screenshot of the response!!

So this is what the console looks like when I run a get on the url. As you can see I get an error response and my message.

And this is what it looks like when using post where it does not look like it can get past the post.

You should utilize toPromise on the Observable returned from rather than explicitly creating an instance of Promise.

If for no other reason than you’re currently swallowing up any errors that occur.

How would I go about doing such with my post call?

I have tried this but I am getting Uncaught in promise.'/alerts/create.php', data, {headers: myheaders})
            res => {

I got it working with this but I feel like I should be incorporating a promise into this function but would that be needed for a'/alerts/create.php', data, {headers: myheaders})
        .map(res => res)
          .subscribe(data => {