URL:分号代替问号 [英] URL: semicolon instead of question mark

查看:88
本文介绍了URL:分号代替问号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在以这种格式调用网络服务:

I'm calling a web service in this format:

http://some.server/rest/resource;a=b

它有效,但有效吗?我见过;用作 & 的替代品但从未见过这样的网址.我一直在寻找答案,但没有找到有效的答案.如果有效,这种网址的含义是什么?

It works but is this valid? I've seen the ; used as a replacement for the & but never seen such an url. I've been looking for an answer but did not find a valid one. If valid what is the meaning of this kind of url?

推荐答案

这是 path 参数的一部分,而不是 query 参数的一部分.您可以在 http://www.skorks.com/2010/05/what-every-developer-should-know-about-urls/

This is a part of the path parameters and not part of the query parameters. You can find detailed information on how URLs can be built at http://www.skorks.com/2010/05/what-every-developer-should-know-about-urls/

我之前实际上是在寻找这个链接,它解释得更好,并向您展示了一些奇怪但有效的案例:https://www.talisman.org/~erlkonig/misc/lunatech%5Ewhat-every-webdev-must-know-about-url-encoding/(最初在现在已失效的 urlhttp://blog.lunatech.com/2009/02/03/what-every-web-developer-must-know-about-url-encoding)

I was actually looking for this link earlier which explains it even better and shows you some weird but valid cases: https://www.talisman.org/~erlkonig/misc/lunatech%5Ewhat-every-webdev-must-know-about-url-encoding/ (originally at the now dead url http://blog.lunatech.com/2009/02/03/what-every-web-developer-must-know-about-url-encoding)

但无论如何,这是有效的:http://www.blah.com/some/crazy/path.html;param1=foo;param2=bar

But anyway, this is valid: http://www.blah.com/some/crazy/path.html;param1=foo;param2=bar

这篇关于URL:分号代替问号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆