greptilian logo

IRC log for #rest, 2015-07-27

#rest on freenode has been logged here from May 2014 until end of July 2018 but logging has been suspended because the channel has been riddled with spam since August 2018 with no end in site. See the following blog posts about the problem:

Until the spam problem has been dealt with and logging can resume, please visit our wiki at https://trygvis.io/rest-wiki/

Thanks.

| Channels | #rest index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
00:08 wsiqueir joined #rest
00:26 fuzzyhorns joined #rest
01:35 mamund joined #rest
02:02 ralphschindler joined #rest
02:15 baweaver joined #rest
03:16 fuzzyhorns joined #rest
04:52 baweaver joined #rest
06:30 digitalsanctum joined #rest
07:06 _ollie joined #rest
07:47 graste joined #rest
08:36 _ollie joined #rest
08:40 daxim joined #rest
09:00 quimrstorres joined #rest
09:04 quimrstorres joined #rest
09:53 trygvis http://pastie.org/10314155
09:53 trygvis *barf*
09:53 trygvis that's from Linode's "api"
09:58 asdf` looks like a typical generic rpc thing then
09:58 asdf` there's probably a library you should use with it
09:58 asdf` (that only just happens to use http as the transport)
09:59 trygvis you should always use a library
10:00 asdf` i mean a library specifically made for the linode api, probably maintained by linode
10:00 trygvis I just don't get it why people make so bad APIs
10:05 asdf` oh but they don't advertise it as a REST api
10:05 asdf` i kinda expected they would
10:06 trygvis but just for HTTP it is horrible
10:06 asdf` it's kinda silly to use HTTP for a rpc scheme, rather than capn proto or whatever, isn't it
10:08 trygvis if you're going to use RPC and be publicly available you kinda almost have to use HTTP
10:08 trygvis and it really doesn't depend on if you're using RPC or not
10:09 asdf` do you mean because how people only know how to use http, or because how that's what the browsers do, or because how 443 is the only allowed port in some networks
10:09 trygvis good luck getting CORBA to work on the internet :)
10:10 asdf` i'm too young to have ever encountered CORBA ;)
10:10 trygvis I was thinking of the network thing mainly, but the first point is more and more valid nowadays
10:19 ramsey_ joined #rest
10:24 bigbluehat_ joined #rest
10:24 ReScO joined #rest
10:26 quimrstorres joined #rest
10:45 Debolaz joined #rest
11:00 metasansana joined #rest
11:16 upasana joined #rest
11:48 Left_Turn joined #rest
11:54 _ollie joined #rest
13:22 _ollie joined #rest
13:35 fuzzy_horns joined #rest
14:00 _longines joined #rest
14:25 saml joined #rest
14:58 wsiqueir joined #rest
15:02 quimrstorres joined #rest
15:03 quimrstorres joined #rest
15:04 ozette joined #rest
15:38 cigarshark joined #rest
16:20 baweaver joined #rest
16:44 baweaver joined #rest
17:43 cigarshark joined #rest
17:46 dEPy joined #rest
18:05 fuzzy_horns joined #rest
18:21 quimrstorres joined #rest
18:23 impl joined #rest
18:53 ozette is it possible and does it make sense to have a POST like /api/configuration?configuration={"key":"value"} ?
18:53 trygvis yes, and no
18:57 ozette why no?
18:58 ozette how can i POST a complete (pretty big) json object in a REST fashion
18:58 ozette i don't see a logic way to POST json, only return json
18:58 trygvis it is wrong on many levels, but the first thing you'll notice is that there is a limit on how long the URL can be
18:59 ozette true
18:59 trygvis with POST you normally include a body
19:01 ozette a POST body is a list of key-values am i right?
19:02 sfisque a post body is a stream
19:02 ozette really?
19:02 sfisque it "can" be a stream of key/value pairs
19:02 sfisque it could be a pdf
19:02 sfisque it could be a csv stream
19:02 ozette fair enough
19:02 sfisque it could be an xcel spreadsheet
19:02 sfisque or an aiff stream
19:03 ozette let's say i have a json object on the client side, and i want to POST or PUT it to a backend
19:03 fumanchu depends on the client
19:03 ozette the way i'm trying to do that now is xhr.open("POST", "/api/commit/configuration"); xhr.send(json-object);
19:03 sfisque depends on how the service is set up.  does it want key/value pairs (norma "form" post) or does it want a json block as a stream?
19:03 fumanchu e.g. http://stackoverflow.com/questions/5570747/jquery-posting-json
19:04 ozette i see
19:05 fumanchu this channel isn't generally for questions about how to program a particular HTTP client or server implementation (which each have their own channels). this is for discussing the architectural style that guided the design of HTTP itself (and how it might guide your specific architecture or not)
19:06 ozette i understand, i was just wondering if it makes sense in the way a REST structure was meant to be
19:08 ozette i've seen REST apis wherein they use ?action= or ?uuid= or ?token=  to me that seems like a combination of rest and query strings
19:08 sfisque if you are POSTing it's not a good idea to tag params along GET style, it can play havoc with your caching mechs, for the start
19:09 sfisque you "can" do it… but it's not a generally good idea
19:10 fumanchu right
19:11 ozette aha
19:11 fumanchu query strings are part of the URI and should be used to *identify* the resource, nothing else
19:17 _ollie1 joined #rest
19:23 quimrstorres joined #rest
19:47 ozette i'll think of a clever way to do this, but i'm kind of stuck, anyway i have to go now
19:48 ozette thanks for the help
21:02 quimrstorres joined #rest
21:29 quimrstorres joined #rest
21:33 quimrstorres joined #rest
22:39 fuzzyhorns joined #rest
23:10 baweaver joined #rest
23:21 fuzzyhorns joined #rest

| Channels | #rest index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

#rest on freenode has been logged here from May 2014 until end of July 2018 but logging has been suspended because the channel has been riddled with spam since August 2018 with no end in site. See the following blog posts about the problem:

Until the spam problem has been dealt with and logging can resume, please visit our wiki at https://trygvis.io/rest-wiki/

Thanks.