This is what I am trying to achieve with Angular :
this.headers = ...;
this.http.get(`${urlApi}`).subscribe(data => {
// go to url with specific headers
}, err => {
console.log(err);
});
When I get the response of a get request from my server, I want to redirect to an external url with specific headers, to be able municate some information between two apps.
There must be a way to do this. I know it's not possible using window.location.href
.
This is what I am trying to achieve with Angular :
this.headers = ...;
this.http.get(`${urlApi}`).subscribe(data => {
// go to url with specific headers
}, err => {
console.log(err);
});
When I get the response of a get request from my server, I want to redirect to an external url with specific headers, to be able municate some information between two apps.
There must be a way to do this. I know it's not possible using window.location.href
.
- I also need to know how to send the headers while calling external urls. Let me know if you got it how to do it. Thanks. – Surya Commented Jun 25, 2021 at 7:44
1 Answer
Reset to default 5From what I have learnt, this is a redirection, not a request : this means you can't add headers to your redirect.
But, what you can do, is send URL params to your second application.
In your URL, simply append
?param1=value1¶m2=value2¶m3=value3 /// etc.
At the end of your URL.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745466741a4628948.html
评论列表(0条)