reading-notes

This is my reading notes for Code Fellows.

1)What does REST stand for?

REST stands for representational state transfer and was created by computer scientist Roy Fielding.

2)REST APIs are designed around a __.

resource

3)What is an identifer of a resource? Give an example.

A resource has an identifier, which is a URI that uniquely identifies that resource. For example, the URI for a particular customer order might be:

HTTP

4)What are the most common HTTP verbs?

GET, POST, PUT, PATCH, and DELETE.

5)What should the URIs be based on?

When possible, resource URIs should be based on nouns (the resource) and not verbs (the operations on the resource).

6)Give an example of a good URI.

https://adventure-works.com/orders What does it mean to have a ‘chatty’ web API? Is this a good or a bad thing?

Avoid “chatty” web APIs that expose a large number of small resources. Such an API may require a client application to send multiple requests to find all of the data that it requires.

7)What status code does a successful GET request return?

code 200

8)What status code does an unsuccessful GET request return?

return 404 (Not Found).

9)What status code does a successful POST request return?

If a POST method creates a new resource, it returns HTTP status code 201 (Created).

10)What status code does a successful DELETE request return?

If the delete operation is successful, the web server should respond with HTTP status code 204 (No Content),

Home