5.3.1. XML元数据编码示例

  1. GET /restconf/data/interfaces/interface=eth1
  2. ?with-defaults=report-all-tagged HTTP/1.1
  3. Host: example.com
  4. Accept: application/yang-data+xml

服务器可能会如下回应:

  1. HTTP/1.1 200 OK
  2. Date: Thu, 26 Jan 2017 20:56:30 GMT
  3. Server: example-server
  4. Content-Type: application/yang-data+xml
  5. <interface
  6. xmlns="urn:example.com:params:xml:ns:yang:example-interface">
  7. <name>eth1</name>
  8. <mtu xmlns:wd="urn:ietf:params:xml:ns:netconf:default:1.0"
  9. wd:default="true">1500</mtu>
  10. <status>up</status>
  11. </interface>