Appendice B. 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.
- Ingresso:
Destination IP Address = [2001:db8::2:1]
Destination UDP Port = 5683
Uscita:
coap://[2001:db8::2:1]/
- Ingresso:
Destination IP Address = [2001:db8::2:1]
Destination UDP Port = 5683
Uri-Host = "example.net"
Uscita:
coap://example.net/
- Ingresso:
Destination IP Address = [2001:db8::2:1]
Destination UDP Port = 5683
Uri-Host = "example.net"
Uri-Path = ".well-known"
Uri-Path = "core"
Uscita:
coap://example.net/.well-known/core
- 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
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.)
- Ingresso:
Destination IP Address = 198.51.100.1
Destination UDP Port = 61616
Uri-Path = ""
Uri-Path = "/"
Uri-Path = ""
Uri-Path = ""
Uri-Query = "//"
Uri-Query = "?&"
Uscita:
coap://198.51.100.1:61616//%2F//?%2F%2F&?%26