‘?’ 在 URL 中的含义是什么?

huangapple go评论59阅读模式
英文:

What is '?' is meaning in url?

问题

在代码编写时,当我输入地震API链接时,我注意到链接中有一个'?',然后我尝试查找关于它的信息,但没有进展。

像这样的URL中,'?' 的含义是什么:

https://earthquake.usgs.gov/fdsnws/event/1/query?starttime=2014-01-01&endtime=2014-01-02

我在其他网站上也看到过类似的情况,例如YouTube或Google,例如:'query?'、'watch?'、'count?'、'search?':

https://www.youtube.com/watch?v=dQw4w9WgXcQ

https://www.google.com/search?q=pi&sxsrf=APwXEdfoougSC4O6KeDi5afxiy0rL671Rg%3A1685072498601&source=hp&ei=cipwZKTQIpCUrwSHkqKgCQ&iflsig=AOEireoAAAAAZHA4gq4mE-4ZNz8m747alblR3ZAPLE84&ved=0ahUKEwik0cqdiJL_AhUQyosKHQeJCJQQ4dUDCAk&uact=5&oq=pi&gs_lcp=Cgdnd3Mtd2l6EAMyDAgjEIoFEBMQgAQQJzIHCCMQigUQJzINCAAQigUQsQMQgwEQQzIHCAAQigUQQzILCAAQgAQQsQMQgwEyCggAEIoFELEDEEMyBwgAEIoFEEMyCwgAEIAEELEDEIMBMhEILhCABBCxAxCDARDHARDRAzILCAAQgAQQsQMQgwE6BwgjEOoCECc6BAgjECc6BAgAEANQohRY9RVgvRloAnAAeACAAfABiAHRA5IBAzItMpgBAKABAbABCg&sclient=gws-wiz

英文:

I'm writing code and when I type in the earthquake API link I noticed a '?' in the link and then I try to find information about it but no progress.

What is the meaning of '?' in url like this:

https://earthquake.usgs.gov/fdsnws/event/1/query?starttime=2014-01-01&endtime=2014-01-02

I'm seeing this in other sites like Youtube or google, for example: query?, watch?, count?, search?:

https://www.youtube.com/watch?v=dQw4w9WgXcQ

https://www.google.com/search?q=pi&sxsrf=APwXEdfoougSC4O6KeDi5afxiy0rL671Rg%3A1685072498601&source=hp&ei=cipwZKTQIpCUrwSHkqKgCQ&iflsig=AOEireoAAAAAZHA4gq4mE-4ZNz8m747alblR3ZAPLE84&ved=0ahUKEwik0cqdiJL_AhUQyosKHQeJCJQQ4dUDCAk&uact=5&oq=pi&gs_lcp=Cgdnd3Mtd2l6EAMyDAgjEIoFEBMQgAQQJzIHCCMQigUQJzINCAAQigUQsQMQgwEQQzIHCAAQigUQQzILCAAQgAQQsQMQgwEyCggAEIoFELEDEEMyBwgAEIoFEEMyCwgAEIAEELEDEIMBMhEILhCABBCxAxCDARDHARDRAzILCAAQgAQQsQMQgwE6BwgjEOoCECc6BAgjECc6BAgAEANQohRY9RVgvRloAnAAeACAAfABiAHRA5IBAzItMpgBAKABAbABCg&sclient=gws-wiz

答案1

得分: 1

'?'是URL中查询参数的起始符号。查询参数是附加到URL末尾的一组定义好的参数。它们是URL的扩展,用于根据传递的数据来定义特定的内容或操作。要将查询参数附加到URL的末尾,需要添加一个'?',然后紧接着是查询参数。

英文:

The ? is the start of the query parameter in the URL. Query parameters are a defined set of parameters attached to the end of a URL. They are extensions of the URL that are used to help define specific content or actions based on the data being passed. To append query params to the end of a URL, a ‘?’ is added followed immediately by a query parameter.

huangapple
  • 本文由 发表于 2023年5月26日 11:57:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/76337567.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定