如何验证深链路URL进入真实页面?

发布于 2025-02-03 01:09:41 字数 337 浏览 4 评论 0原文

在从事一个项目时,我有一系列与不同应用程序的深层链接(可能是iOS或Android)。我想验证这些URL实际上去某个地方,并且不会导致错误。我到处都没有找到任何明确的解决方案。

例如深链接 'instagram://用户?用户名= ESPN'

将直接在Instagram应用中打开@ESPN帐户,但是

'instagram:// abcd'不会做任何事情并且应该是无效的。

  • 注意:此问题不涉及深层链接的语法或正则诉讼。相反,我想知道我将如何验证深链接进入某个地方(例如,对于常规URL,我可以检查HTTP状态代码不是404)。

While working on a project I have a series of deep links that go to different apps (could be iOS or android). I want to validate that these urls actually go somewhere and won't result in an error. I've looked everywhere an haven't found any clear solutions.

For example the deep link
'instagram://user?username=espn'

will open up the @espn account directly in the instagram app, but

'instagram://abcd' will not do anything and should be invalid.

  • NOTE: this question is NOT involving the syntax or regex for deep links. Rather, I want to know how I would go about validating the deep links go somewhere (ex. for a regular url I can check that the http status code isn't 404).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文