greptilian logo

IRC log for #rest, 2015-11-24

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:01 anth0ny joined #rest
00:06 anth0ny joined #rest
01:16 mgomezch joined #rest
01:23 mgomezch_ joined #rest
01:24 sulky joined #rest
01:47 baweaver joined #rest
02:27 simonv3 joined #rest
02:48 baweaver joined #rest
03:39 baweaver joined #rest
03:49 fumanchu joined #rest
04:23 vanHoesel joined #rest
05:25 vanHoesel joined #rest
06:45 vanHoesel joined #rest
07:00 vanHoesel joined #rest
07:12 _ollie joined #rest
07:18 vanHoesel joined #rest
08:32 interop_madness joined #rest
08:35 rosstuck joined #rest
08:36 _ollie joined #rest
08:54 graste joined #rest
09:00 Macaveli joined #rest
09:04 baweaver joined #rest
10:05 baweaver joined #rest
12:08 baweaver joined #rest
12:34 rosstuck_ joined #rest
12:48 vanHoesel joined #rest
12:50 mezod joined #rest
14:09 baweaver joined #rest
14:51 eschmidbauer joined #rest
15:20 eschmidbauer left #rest
15:49 simonv3 joined #rest
16:03 Macaveli joined #rest
16:16 bluezone joined #rest
16:21 baweaver joined #rest
16:27 vanHoesel joined #rest
17:15 vanHoesel joined #rest
17:27 logikos joined #rest
17:28 logikos should a PUT/POST requests respond back with the created/updated object, or a uri location to the resource, or...?
17:28 logikos some stack overflow posts i read say to set the location header, others say not to....
17:29 trygvis you can choose
17:29 logikos is there an adhered to convention ?
17:29 trygvis make it useful
17:29 logikos i supose i could respond with the object and the location both in json
17:29 logikos {"location":"/whatever/234/","record":{ ... }}
17:30 logikos in the body?
17:31 logikos in the case i have right now the client doesnt really need any information other than was it successful  .. but i was wondering if there was a good rule to follow for all put/post 's
17:31 anth0ny joined #rest
17:31 trygvis I wouldn't put it in the body
17:32 trygvis the redirect, use the standard headers instead
17:35 logikos I'm not trying to redirect the client though, just pass information to the client
17:35 anth0ny_ joined #rest
17:36 logikos it is up to the client if they want to go to it or not
17:36 logikos perhaps they will prompt the user and ask them if they want to open it .. i dont know
17:37 trygvis it is still not a good idea to invent your own solution when there is an existing solution
17:37 vanHoesel joined #rest
17:49 baweaver joined #rest
17:53 vanHoesel joined #rest
18:03 anth0ny joined #rest
18:05 eschmidbauer joined #rest
18:11 eschmidbauer joined #rest
18:13 eschmidbauer left #rest
18:14 logikos trygvis: so you would use the location header to pass it with a 200 response code? it shouldn’t auto redirect with a 200 code regardless of the location header being set should it?
18:15 trygvis "it"?
18:29 logikos trygvis: so you would use the location header with a 200 response code? the client shouldn’t auto redirect with a 200 code regardless of the location header being set? (rephrased to make it more clear, but already did a test to discover the answer for myself)
18:41 trygvis 200 implies that there is a body, if you don't want to send a body you should use 204
18:41 trygvis there is also this: https://tools.ietf.org/html/rfc7240
18:50 lemur joined #rest
19:25 vanHoesel joined #rest
19:50 vanHoesel joined #rest
19:51 baweaver joined #rest
20:13 bogdananton joined #rest
20:17 vlakarados joined #rest
20:40 logikos trygvis: that document seems to be using a request header called 'Prefer' which is not in the http spec is it?
20:42 logikos can we just send whatever headers we want?
20:42 trygvis it not being in the first specification doesn't make you can't add stuff later on
20:42 trygvis yes, of course
20:47 logikos same thing with responce headers .. i can just make up whatever headers i want and start my own convention?
20:48 logikos response*
20:49 trygvis yes, but you usually don't need to
21:13 Coldblackice joined #rest
21:39 vanHoesel joined #rest
21:40 Jarda joined #rest
21:54 lemur joined #rest
22:31 mooncup joined #rest
22:39 jasabella joined #rest
22:40 jasabella hi :) i'm currently designing a restful api and found that the url's are pretty similar to my website's ones... is this a bad sign?
22:42 jasabella e.g. api.example.com/banana/42/length to populate the example.com/banana/42 page
22:50 spaceone joined #rest
22:51 mooncup joined #rest
23:34 _ollie joined #rest
23:42 pdurbin jasabella: should be fine
23:46 spaceone what did i miss?

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

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