Consider the following Python script that uses the requests library to delete a VLAN via RESTCONF on a Cisco IOS-XE device: ```python import requests from requests.auth import HTTPBasicAuth url = 'https://192.168.1.1/restconf/data/Cisco-IOS-XE-native:native/vlan=10' headers = { 'Accept': 'application/yang-data+json', 'Content-Type': 'application/yang-data+json' } auth = HTTPBasicAuth('admin', 'cisco') response = requests.delete(url, headers=headers, auth=auth, verify=False) print(response.status_code) ``` What is the expected outcome if the VLAN 10 exists?
The DELETE method removes the specified resource.
Why this answer
Exam trap
The trap here is that candidates may confuse HTTP methods, thinking DELETE requires a payload like PUT/POST, or mistakenly believe DELETE can retrieve or create resources, when in fact each HTTP method has a distinct CRUD mapping in RESTCONF.
How to eliminate wrong answers
Option A is wrong because an HTTP DELETE request does not retrieve data; retrieving data requires an HTTP GET request. Option B is wrong because creating a resource uses an HTTP POST or PUT request, not DELETE. Option D is wrong because RESTCONF DELETE operations do not require a payload; the resource is identified by the URL path alone, and a missing payload does not cause an error for DELETE.