REST

what is REST?

is it just using the less common verbs for HTTP requests?

Attached: rest.png (288x175, 2K)

Other urls found in this thread:

url/PUT
ics.uci.edu/~fielding/pubs/dissertation/top.htm
rest.elkstein.org/
twitter.com/NSFWRedditVideo

REST is really just replacing less common HTTP methods with URIs

Jow Forums is a REST-ful site

URIs? like :
>url/PUT
?

REST is the only sane thing about web development at the moment

Read the original thesis, it is quite short and accessible.

A man needs a link

ics.uci.edu/~fielding/pubs/dissertation/top.htm

>'is short'
>14 pages single-spaced
tl;dr

>is it just using the less common verbs for HTTP requests?
It's using the verbs to do what the name suggests.

Example: this URL
/api/Jow Forums/threads

If you did a POST request, it would create a new thread and return the ID of that thread (let's say 12345).

Example 2: we made a thread, now we have this URL
/api/4chans/threads/12345

If you did a GET request, it would get the data for that thread and return in.
If you did a PUT request, it would update the data for that thread with the data you included in the request.
If you did a DELETE request, it would delete the data for that thread.

it's a stateless method for interaction with textual representations of resources. It's typically synchronous, and operations are idempotent.

things should be stateless, be cacheable, and ultimately uniform.

tl;dr: It's not a framework it's a methodolody.

REST is when cute doggos and puppers sleep tight.

Everything is a resource and you use all verbs to modify them.

I just red Ellen pao's entire sob story. This is shorter and actually neurogenerative.

The only true answer. Everything else produces nerve gas.

Attached: rest tight pupper.webm (720x720, 689K)

REST: URIs are not files, they are parameters to a command.

Who is ellen pao and what is she crying about?

Good explanation

->

rest.elkstein.org/

It's a meme.

The limitation of REST is that the ONLY verbs you can use are the basic CRUD ones. But the second you need to invoke a process, REST standards have to be broken. Then you're left with just an HTTP API.

Not that there's anything wrong with that, but REST is not the end all be all of API design. Not everything can be expressed in terms of CRUD verbs.

REST is only meant to be used as a wrapper. The actual processing/logic happens on the backend. Most everything can be expressed as 1. getting data 2. sending data 3. updating data. Even database operations (which is the underlying essence of everything) can be expressed as such. No need to complicate things.

>fuck SOAP

What's REST? i thought it were the same that CRUD...

>Most everything

But not everything. When you need to invoke a long running job (say a test run in a test harness), it might make sense to say POST /exection/testsuite/:id but does it really make sense to have an update associated with that URI? Or even a read?

The test results will likely fit better under a different URI, like GET /testrun/:id. But then does it make sense to have a POST on that URI? Does a POST on that URI add results, or invoke a new test run? It's ambiguous. Without the word 'execution' in the first example, that endpoint would also be ambiguous.

REST falls apart when you need to invoke long running processes. REST is only good for simple CRUD bullshit. People bash SOAP because they used it for little CRUD apps that should have used REST, and people bash REST when they should have written their own API in a protocol of their liking. HTTP just happens to be ideal nowadays since anything can use it.

like ftp.

It's the most boring, bureaucratic thing about web dev. I can't wait to learn GraphQL enough to never again write a REST API

Idk i just use insomnia and make endpoints and do post gets with queues