メインコンテンツまでスキップ

Appendix B. URI Examples (URI の例)

Appendix B. URI Examples (URI の例)

以下の例は, さまざまな Uri オプションのセットと, それらから URI を構築した結果を示しています。オプションに加えて, Section 6.5 は宛先 IP アドレスとポートを参照していますが, アルゴリズムのすべてのパスが宛先 IP アドレスとポートを URI に含めるわけではありません。

例 1:

  • Input (入力):
Destination IP Address = [2001:db8::2:1]
Destination UDP Port = 5683
  • Output (出力):
coap://[2001:db8::2:1]/

例 2:

  • Input (入力):
Destination IP Address = [2001:db8::2:1]
Destination UDP Port = 5683
Uri-Host = "example.net"
  • Output (出力):
coap://example.net/

例 3:

  • Input (入力):
Destination IP Address = [2001:db8::2:1]
Destination UDP Port = 5683
Uri-Host = "example.net"
Uri-Path = ".well-known"
Uri-Path = "core"
  • Output (出力):
coap://example.net/.well-known/core

例 4:

  • Input (入力):
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 (出力):
coap://xn--18j4d.example/
%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF

(改行は読みやすさのために挿入されています; これは URI の一部ではありません。)

例 5:

  • Input (入力):
Destination IP Address = 198.51.100.1
Destination UDP Port = 61616
Uri-Path = ""
Uri-Path = "/"
Uri-Path = ""
Uri-Path = ""
Uri-Query = "//"
Uri-Query = "?&"
  • Output (出力):
coap://198.51.100.1:61616//%2F//?%2F%2F&?%26