統合アーキテクトは、デフォルトで HTTP/11 経由で XML と JSON の両方のコンテンツに対する API クライアントからの要求を受け入れる必要がある API を設計しています。 意図された典型的な目的で使用される場合、アーキテクトはこれらの要件を満たすためにどの API アーキテクチャ スタイルを選択する必要がありますか?
正解:C
REST (Representational State Transfer) is an architectural style commonly used for designing networked applications, particularly APIs that need to handle multiple content types over HTTP. Here's a detailed explanation: * Content Negotiation: * Definition: REST APIs support content negotiation, allowing clients to request either XML or JSON formats by setting theAcceptheader in HTTP requests. * Flexibility: This capability makes REST ideal for scenarios where an API needs to serve multiple content types. * HTTP Protocol: * Usage: REST APIs operate over HTTP/1.1, making them compatible with web standards and easily accessible by various clients (browsers, mobile apps, etc.). * Methods: Supports standard HTTP methods like GET, POST, PUT, DELETE, allowing for CRUD operations. * Advantages: * Stateless: Each request from a client to server must contain all the information needed to understand and process the request. * Scalability: RESTful services can handle a high load of requests efficiently. References * REST API Design:RESTful Web Services * Content Negotiation:HTTP Content Negotiation