Time  Nick     Message
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
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: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