greptilian logo

IRC log for #rest, 2014-06-18

https://trygvis.io/rest-wiki/

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

All times shown according to UTC.

Time S Nick Message
00:35 wilmoore joined #rest
01:09 m0ltar joined #rest
01:33 jcromartie joined #rest
04:37 wilmoore joined #rest
05:01 DracoBlue joined #rest
05:37 _ollie joined #rest
06:16 DracoBlue joined #rest
06:22 pindonga joined #rest
07:13 fumanchu joined #rest
07:16 rincewind joined #rest
07:19 fumanchu_ joined #rest
07:29 DracoBlue joined #rest
07:47 DracoBlue joined #rest
08:40 shrink0r joined #rest
09:05 graste joined #rest
09:40 shrink0r joined #rest
10:01 DracoBlue joined #rest
10:07 shrink0r joined #rest
10:55 DracoBlue joined #rest
11:17 interop_madness joined #rest
11:19 graste joined #rest
11:35 m0ltar joined #rest
12:00 DracoBlue joined #rest
12:06 Left_Turn joined #rest
12:15 jcromartie joined #rest
12:53 mgomezch joined #rest
13:01 jcromartie joined #rest
13:06 dEPy joined #rest
13:11 DracoBlue joined #rest
13:29 dEPy how wrong is putting verbs in urls?
13:30 _ollie strictly speaking… what text makes up the URI is completely irrelevant…
13:30 _ollie what matters is how the resources they identify behave…
13:30 dEPy I have the scenario where I have a Task resource, and I want to enable to convert that task from one type to another
13:31 dEPy So I'm not sure if doing  PUT /tasks/ID/convert_to_consultation   is really wrong or not
13:49 fumanchu_ PATCH /tasks/ID/ <- {"type": "consultation"}
13:49 fumanchu_ send the state you want to achieve
13:50 fumanchu_ hence the name "representational state transfer"
13:52 dEPy that was my firs thought yes :) but unfortunatelly our codebase it a bit messy on this end and I can't do that...
13:53 dEPy Well, maybe not is the time to clean up the mess :)
13:55 fumanchu_ "if payload['type'] != resource.type: resource.convert(payload['type'])" is not *that* much harder than "resource.convert('consultation')"
13:55 fumanchu_ unless you wen and wrote your own http server that doesn't support PATCH
13:55 fumanchu_ went*
13:56 _ollie if a conversion is that simple PATCH is fine I thinkn, but if it requires multiple steps a dedictaed resource is probably the better way…
13:56 fumanchu_ it's not better if it doesn't invalidate the caches on the target resource
13:57 _ollie well, that's the whole point…
13:57 _ollie if the conversion might require a few steps, it's not complete until all these steps were passed successfully… hence the original resource hasn't changed state yet
13:58 fumanchu_ yes, but I didn't gather that from the OP's suggestion of PUT to a single URI
13:59 _ollie what's wrong with that? you create a resource…
13:59 _ollie you initiate (create) a conversion…
14:00 DracoBlue joined #rest
14:05 * fumanchu_ is waiting for what follows the ...
14:06 DracoBlue joined #rest
14:11 fumanchu_ dEPy: go find the free electron on your team who can pull an all-nighter and clean up the code. debt sucks because you cannot take risks and you will stagnate in technical poverty
14:14 nkoza joined #rest
14:24 Left_Turn joined #rest
15:10 shrink0r joined #rest
16:50 graste joined #rest
17:25 wilmoore joined #rest
17:27 danizord joined #rest
17:59 antiPoP joined #rest
17:59 antiPoP HI, 'm developing a web client with uses rest
18:00 antiPoP my question is: how do I persist the api_key among multiple pages witjhout using sessions?
18:01 pdurbin don't you just send the api key every time?
18:03 antiPoP the issue is:
18:04 antiPoP I have a login screen
18:04 antiPoP and I redirect form that login screen to the dashboard
18:04 antiPoP in teh login screen , I can send the api token via ajax
18:04 antiPoP but how do I get in the dashboard
18:05 antiPoP all pages are plain html and are driven by html/jquery
18:05 antiPoP sorry, ajax/jquery
18:06 antiPoP this is , login loads dashboard via document.location
18:06 antiPoP and what only can think is using the dashboard url get parameter
18:07 antiPoP or a cookie
18:12 antiPoP pdurbin, any thoughts?
18:54 nkoza joined #rest
19:17 wilmoore joined #rest
19:33 DracoBlue joined #rest
20:08 shrink0r joined #rest
20:41 Left_Turn joined #rest
20:52 djule5 joined #rest
21:11 _ollie joined #rest
21:29 fumanchu_ antiPoP: use a cookie
21:31 antiPoP that's what I dd :)
21:31 antiPoP fumanchu_: but I feel this is not an optimal solution
21:32 fumanchu_ what qualities does it not optimize well?
21:32 antiPoP Well, actually
21:33 antiPoP I'm storing the info in the client so it does not matter
21:33 fumanchu_ even better :)
21:33 antiPoP but I could integrate the login page into the dashboard making it unnecesary
21:33 Left_Turn joined #rest
21:34 antiPoP and it's not simpler to just use a get paramter?
21:42 m0ltar joined #rest
21:45 fumanchu_ no, because then you're really identifying different resources
21:46 fumanchu_ one downside of that is that users can't then share cached copies of anything
21:47 fumanchu_ but if, like a lot of APIs, you Vary by Cookie it's not that different
21:48 fumanchu_ the other benefit of Cookies is that you can generate temporary tokens at login and not be passing around the original keys all the time
21:48 fumanchu_ particularly in the URL, which tends to be more exposed and get logged a lot
21:49 fumanchu_ without the server then having to spit back out the key in each link it gives you (ick) or have the client construct URI's all the time (ickier)
21:49 antiPoP yes, seem simpler
21:50 antiPoP although changing the keys all the time can cause concurrency issues
21:52 danfinch joined #rest
21:52 shrink0r joined #rest
21:59 antiPoP fumanchu_: I have oto leave, thanks for the advice
22:00 fumanchu_ np
22:00 fumanchu_ good luck :)
22:03 shrink0r joined #rest
22:45 pezra joined #rest

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

https://trygvis.io/rest-wiki/