[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Discussion on RESTful APIs ? I'm under the impression

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 11
Thread images: 4

File: maxresdefault.jpg (99KB, 1920x1080px) Image search: [Google]
maxresdefault.jpg
99KB, 1920x1080px
Discussion on RESTful APIs ?

I'm under the impression right now a REST api is essentially using HTTP to retrieve information from a server via JSON responses.

This confuses me because when I used Paypal's SDK which says REST in the title...I didn't use any JSON to build the script.
>>
File: you know what to doo.jpg (85KB, 640x360px) Image search: [Google]
you know what to doo.jpg
85KB, 640x360px
>>
bump
>>
>>56119314
As far as I understand it OP thats pretty much what REST is.

Technically it comes with all this extra bullshit for example not having any state and using all the HTML request things instead of just POST/GET all the time or whatever. But in practice thats a load of fuck. Good luck with sessions when you're not using any state. And nobody uses anything other than POST and GET so shove your fucking PUT, DELETE etc up your ass.
>>
>>56119577
haha. thanks for the validation anon.

if only we can clear up the Paypal confusion now...
>>
The only conclusion I've come to is it is passing variables threw the URL but I don't think that would be classified as REST since it's not JSON...

Unless REST is not limited to JSON.
>>
>>56119652
GET passes stuff through the URL and is used to get something from the server i.e get me all the data on the nigger with uuid xxx-333-yyy etc and the uuid would be in the URL. That uuid would be accessed as the querystring from the server. I think you could use JSONs in this manner but its a horrible idea.

POST is for sending JSONs. Use JSON.stringify(fuckingObject) when sending data in a POST.

REST advocates using GET/POST how they were originally intended i.e. to get something and to send something. Both are restful, it dosent have to be JSON. You could use a POST request to send nigger uuid and get the data attached to it but that wouldn't be strictly restful.
>>
>>56119769
dam. That even clears up my confusion with what "RESTful" is. Much appreciated.
>>
No, ReST is a way of structuring routes/resources. Unrelated to JSON. It's just most services today will use JSON vice XML.

http://restfulrouting.com/#introduction

It's a way of breaking resource requests into their CRUD (create read update destroy) categories.


Most important idea is this:
INDEX GET
SHOW GET
CREATE POST
NEW GET
EDIT GET
UPDATE PUT
DESTROY DELETE
>>
>>56119314
rest just means putting all of the state in the addressbar. json has nothing to do with it
>>
REST is a few different principles. REST doesn't say anything about using JSON (you can use XML or protobufs if you want).

REST is about using HTTP verbs (GET, POST, PUT, DELETE) to interact with data.

REST is about GET /users/ getting all the users, and GET /users/1 getting the first user.

REST is about using "DELETE /users/1" instead of "GET /users/1/delete".

StackOverflow is a better place for questions like this:
http://stackoverflow.com/questions/671118/what-exactly-is-restful-programming
Thread posts: 11
Thread images: 4


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.