PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

You are developing an ASP.NET MVC application.
The application provides a RESTful API for third-party applications. This API updates the information for a
contact by embedding the information in the URL of an HTTP POST.
You need to save the Contact type when third-party applications use the EditContact method.
Which code segment should you use? {Each correct answer presents a complete solution. Choose all that
apply.)

PrepAway - Latest Free Exam Questions & Answers

A.
Option A

B.
Option B

C.
Option C

D.
Option D

Explanation:
Basics of RESTful services:
REST stands for Representational State Transfer, it is a simple stateless architecture that runs over
HTTPwhere each unique URL is representation of some resource. There are four basic design principles which
should be followed when creating RESTful service:
* Use HTTP methods (verbs) explicitly and in consistent way to interact with resources (Uniform Interface), i.e.
to retrieve a resource use GET, to create a resource use POST, to update a resource use PUT/PATCH, and to
remove a resource use DELETE.
Etc.

6 Comments on “Which code segment should you use?

  1. rodrigoleitetr says:

    This question seems is weird.. there is another similar question, but this one is saying the the informaton comes in the URL, not in the request body (POST): ” embedding the information in the URL”. So, B and C would be the correct as the information should be retrieved from the URL.




    2



    0

Leave a Reply