Getting error In ANGULAR 6 console origin 'http://localhost:4200' has been blocked by CORS policy

Viewed 106

Angular 6 -> I am sending data in POST request with application/json. When I hit this I get

Request Method: OPTIONS Status Code: 200 OK

But getting Cors issue in Console. I checked all examples and document.This request is running in POSTMAN

import { Http, Headers, RequestOptions } from "@angular/http";

let headers = new Headers();
    headers.set("Content-Type", "application/json");
    let option = new RequestOptions();
    option.headers = headers;
    return this.http.post(this.url, JSON.stringify(this.data), option);
0 Answers
Related