exam questions

Exam 70-480 All Questions

View all questions & answers for the 70-480 exam

Exam 70-480 topic 3 question 28 discussion

Actual exam question from Microsoft's 70-480
Question #: 28
Topic #: 3
[All 70-480 Questions]

You develop a web application by using jQuery. You develop the following jQuery code: (Line numbers are included for reference only.)

The web application exposes a RESTful web API that has an endpoint of/product/create.
You need to create a new product by using AJAX.
Which code segment should you insert at line 05?

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️
* url: /product/create
This is the endproduct.
* datatype:
The type of data that you're expecting back from the server.
* contentType (default: 'application/x-www-form-urlencoded; charset=UTF-8')
Reference: jQuery.ajax()

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Bennyseems
5 years, 4 months ago
I should have added: That’s why the answer needs to be “D”. :)
upvoted 3 times
...
Bennyseems
5 years, 4 months ago
We can see that the datatype (which is what gets returned) needs to be json, not xml, since the “success” method refers to “result.message”; this wouldn’t be valid syntax if the datatype were xml. (The content type for answer A is fine however, because the serialize function will url-encode the data.)
upvoted 3 times
...
Shapespacer
5 years, 6 months ago
It can't be A as the contenttype would have to be application/xml the only Viable option is D https://stackoverflow.com/questions/35187424/ajax-request-xml-json
upvoted 1 times
...
Joshua
5 years, 7 months ago
I think the answer is A?
upvoted 1 times
...
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.

SaveCancel
Loading ...