I want to call web service from another domain using angular2 typescript. i am using following code to call api
var req_dict = {
method: RequestMethod.Get,
url: 'http//127.0.0.1:5000/users/',
headers: this.head
}
var options = new RequestOptions(req_dict);
var req = new Request(options);
this.http.request(req).subscribe({});
I hosted my application in http//127.0.0.1:8000. I want to use api from port 5000. when i inspected console , request is going to http://127.0.0.1:8000/http//127.0.0.1:5000/users/ i want to call just http//127.0.0.1:5000/users/. how can call api by absolute url in angular2 ?
url: 'http//127.0.0.1:5000/users/'
it should beurl: 'http://127.0.0.1:5000/users/'
– Vipin Jainurl: 'http://127.0.0.1:5000/users/'
– SeRu