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
HTTP where 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?


Leave a Reply