From the course: Learning REST APIs

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Methods (Verbs)

Methods (Verbs)

- A REST resource enables access to data, but doesn't in itself do anything with that data. To use a REST resource, we have to pass along instructions about what action we want to perform. This is done using HTTP methods, also called verbs. Anytime you use a web browser, you or rather the browser use HTTP methods to tell the server at the other end of the URL what type of request is being sent. By far the most common of these methods is Get which literally means get what's at the end of this address and send it to me. Anytime you visit a webpage or follow a link or click reload or forward or back or any other standard interaction in a browser, you are sending a get request over HTTP. The same goes for REST APIs. If you want to retrieve the data of a resource, you send a Get request. This request will either return a 200 OK HTTP status along with the requested data or a 404 Not Found HTTP status if there's nothing at the other end of the resource or the resource is invalid. Yes, that…

Contents