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.)

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.)

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.



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Joskagyerek

Joskagyerek

A and B correct, not C

fbasa

fbasa

i think the answer A and B are correct by this requirement, “updates the information for a contact by embedding the information in the URL of an HTTP POST”

fbasa

fbasa

sorry B and C rather,

Abdo

Abdo

QueryString is used with HTTP GET not POST, so answer is A & B.