exam questions

Exam 70-487 All Questions

View all questions & answers for the 70-487 exam

Exam 70-487 topic 1 question 110 discussion

Actual exam question from Microsoft's 70-487
Question #: 110
Topic #: 1
[All 70-487 Questions]

DRAG DROP -
You are developing a Microsoft ASP.NET Web API.
You need to create a method to answer to the following raw HTML request.

How should you complete code? To answer, drag the appropriate code segments to the correct locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Each correct selection is worth one point.
NOTE:
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
References:
https://docs.microsoft.com/en-us/aspnet/web-api/overview/getting-started-with-aspnet-web-api/action-results https://docs.microsoft.com/en-us/aspnet/web-api/overview/formats-and-model-binding/parameter-binding-in-aspnet-web-api https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-2.2&tabs=visual-studio#add-get-methods

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
seanlim
Highly Voted 5 years, 7 months ago
public HttpResponseMessage Post([FromBody] string name) { ... }
upvoted 69 times
...
zimzimzimma
Highly Voted 4 years, 8 months ago
Please give me ONE minute in an octagon no holds barred with the person who came up with this 'Suggested Answer'.
upvoted 5 times
...
Dev666
Most Recent 4 years, 9 months ago
isn't a post is from body by default. So should it get as you're overriding the default ??
upvoted 2 times
...
Caloy
4 years, 9 months ago
Isn't it POST?
upvoted 1 times
...
AT_TW
5 years, 3 months ago
why use GET?
upvoted 4 times
Karel_Gott
5 years, 3 months ago
cause they know nothing! :) Post is corret.
upvoted 8 times
...
michaladamczyk
5 years ago
cause request is POST type
upvoted 5 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 ...