Appendix B. URI Examples (Esempi di URI)
Appendix B. URI Examples (Esempi di URI)
I seguenti esempi dimostrano diversi insiemi di opzioni Uri e il risultato dopo aver costruito un URI da essi. Oltre alle opzioni, la Section 6.5 fa riferimento all'indirizzo IP di destinazione e alla porta, ma non tutti i percorsi dell'algoritmo causano l'inclusione dell'indirizzo IP di destinazione e della porta nell'URI.
Esempio 1:
- Input (Ingresso):
Destination IP Address = [2001:db8::2:1]
Destination UDP Port = 5683
- Output (Uscita):
coap://[2001:db8::2:1]/
Esempio 2:
- Input (Ingresso):
Destination IP Address = [2001:db8::2:1]
Destination UDP Port = 5683
Uri-Host = "example.net"
- Output (Uscita):
coap://example.net/
Esempio 3:
- Input (Ingresso):
Destination IP Address = [2001:db8::2:1]
Destination UDP Port = 5683
Uri-Host = "example.net"
Uri-Path = ".well-known"
Uri-Path = "core"
- Output (Uscita):
coap://example.net/.well-known/core
Esempio 4:
- Input (Ingresso):
Destination IP Address = [2001:db8::2:1]
Destination UDP Port = 5683
Uri-Host = "xn--18j4d.example"
Uri-Path = the string composed of the Unicode characters U+3053
U+3093 U+306b U+3061 U+306f, usually represented in UTF-8 as
E38193E38293E381ABE381A1E381AF hexadecimal
- Output (Uscita):
coap://xn--18j4d.example/
%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF
(L'interruzione di riga è stata inserita per leggibilità; non fa parte dell'URI.)
Esempio 5:
- Input (Ingresso):
Destination IP Address = 198.51.100.1
Destination UDP Port = 61616
Uri-Path = ""
Uri-Path = "/"
Uri-Path = ""
Uri-Path = ""
Uri-Query = "//"
Uri-Query = "?&"
- Output (Uscita):
coap://198.51.100.1:61616//%2F//?%2F%2F&?%26