Refer to the exhibit. A network operator wants to add a certain IP to a DMZ tag. Which code segment completes the script and achieves the goal? A. B. C. D.
D is the correct answer: see the requests documentation: https://docs.python-requests.org/en/latest/user/quickstart/#make-a-request
you need first to serialize the value (convert it to python dictionary) in order to append the list, then you need to pass the dictionary as json (if you pass it as data=.. it will be url-form encoded, not json! - see the doc). If you want to pass the argument as data=... you need to first convert the value to string: data=json.dumps(...).
B
session.put uses 'data' parameter
json.loads converts json value to python
json.dump converts python string to json
https://www.w3schools.com/python/python_json.asp
I'd say D. tag_session is a string so we need json.loads to convert to json
upvoted 2 times
...
This section is not available anymore. Please use the main Exam Page.300-735 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.
alainJ
Highly Voted 3 years, 10 months agozamkljo
Most Recent 2 years agohatsec
2 years, 6 months agoSmileebloke
4 years, 3 months agodigger_vce
4 years, 6 months agoMerlinTheWizard
1 year agodust09
4 years, 9 months ago