reading-notes

Think you might be in the wrong place? Go home!

What does REST stand for?

REST stands for Representational State Transfer.

REST APIs are designed around a __.

stateless client-server architecture.

What is an identifier of a resource? Give an example.

An identifier of a resource is typically a URI (Uniform Resource Identifier). Example: https://api.example.com/users/123

What are the most common HTTP verbs?

What should the URIs be based on?

URIs (Uniform Resource Identifiers) should be based on the resources they identify.

Give an example of a good URI.

Example of a good URI: https://api.example.com/products/42

What does it mean to have a ‘chatty’ web API? Is this a good or a bad thing?

Having a ‘chatty’ web API means that it requires a high number of requests to perform a single operation. This is generally considered a bad thing because it can result in increased network latency and reduced performance.

What status code does a successful GET request return?

A successful GET request returns a status code of 200 OK.

What status code does an unsuccessful GET request return?

An unsuccessful GET request can return various status codes, but a common one is 404 Not Found if the requested resource is not available.

What status code does a successful POST request return?

A successful POST request returns a status code of 201 Created if a new resource is successfully created.

What status code does a successful DELETE request return?

A successful DELETE request returns a status code of 204 No Content to indicate that the resource has been successfully deleted. Information gathered using ChatGPT