[英]How to get a redirect URL with Angular5
I get a temporary URL from a JSON server. 我从JSON服务器获得一个临时URL。
This temporary URL redirects to another (permanent) URL. 该临时URL重定向到另一个(永久)URL。
I want to get this redirect (permanent) URL to store it in my DB. 我想获得此重定向(永久)URL,以将其存储在数据库中。
Is it possible with Angular 5 ??? Angular 5有可能吗?
I would have preferred to do it directly in Angular 5. 我宁愿直接在Angular 5中进行操作。
But finally, as suggested by JB and Vaibhav, I used a server on which I ran a PHP program. 但是最后,按照JB和Vaibhav的建议,我使用了运行PHP程序的服务器。 In this program, I get the the redirect URL with curl.
在此程序中,我获得了带有curl的重定向URL。
And I access this PHP program from Angular with HttpClient. 然后,我使用HttpClient从Angular访问此PHP程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.