Provided answer is correct
https://ultraconfig.com.au/blog/restconf-tutorial-everything-you-need-to-know-about-restconf-in-2020/
please don't comment if you havent reference to prove it.
HTTP code 2xx means the request was successful. This discard but A and C as possible answers.
204 (No content) indicates the server fulfilled the request but has no body to return. Looking at the script, it just ask to configure the equipment and it expect no response, so B is the answer.
Codes in 2xx means the action is executed (take options A and C out)
200 means everything went successful as intended (common postman code)
I don't know what 204 code is but between B and D, 204 is slightly away from what option D says
If the response code is 204, it indicates that the server has successfully processed the request and is not returning any content in response.
Therefore, the configuration sent in the script has been successfully applied to GigabitEthernet2 interface on the device, configuring it with the specified IP address.
1- The script sends a PATCH request to the specified URL, which targets GigabitEthernet2 interface on the device.
2- It authenticates using the provided credentials ('admin', 'admin').
3- It sets the request headers to specify acceptance of JSON data and to specify that the sent data is also in JSON format.
4- The data being sent is a JSON object specifying the configuration to be applied to GigabitEthernet2 interface. It sets the IP address to '10.10.10.1' with a subnet mask of '255.255.255.0'.
5- The 'verify' parameter is set to 'False', indicating that SSL certificate verification is disabled. This is typically done for self-signed certificates.
6- Finally, the HTTP response code is printed.
Given answer is correct.
From RFC 7231 Section 6.3.5:
The 204 (No Content) status code indicates that the server has successfully fulfilled the request and that there is no additional content to send in the response payload body. Metadata in the response header fields refer to the target resource and its selected representation after the requested action was applied.
2xx http codes mean success, so A and C are wrong.
D says clear text which is wrong because of the (application/yang-data+json header).
Therefor B is the correct answer.
configuration failed because of Ge2 is not found in device
204 No Content
There is no content to send for this request, but the headers may be useful. The user agent may update its cached headers for this resource with the new ones.
Nope..
2xx are messages for success. "The 204 (No Content) status code indicates that the server has successfully fulfilled the request and that there is no additional content to send in the response payload body." - Body is empty because there is nothing more to say. This eliminates A/C.
And of course, restconf uses HTTPS, so D is no-go as well.
upvoted 3 times
...
...
This section is not available anymore. Please use the main Exam Page.350-401 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Darude
Highly Voted 2 years, 7 months agoManvek
Highly Voted 1 year, 10 months ago1_SL
Most Recent 10 months ago[Removed]
1 year ago[Removed]
1 year ago[Removed]
1 year agoKZM
1 year, 4 months agodragonwise
2 years, 2 months agomhizha
2 years, 1 month agoJust_little_me
1 year, 6 months agokewokil120
2 years, 5 months agoFadhelben
2 years, 5 months agodogdoglee
2 years, 6 months agoStylar
2 years, 6 months agoCiscopass
2 years, 7 months agoiGlitch
2 years, 7 months agoonkel_andi
2 years, 8 months agonetwork_gig
2 years, 7 months agoAndreasThornus
2 years, 6 months agoWooker
2 years, 8 months agotckoon
2 years, 8 months agoMerlinTheWizard
2 years, 4 months ago