greptilian logo

IRC log for #rest, 2014-12-16

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:12 daxim joined #rest
00:12 mezod_ joined #rest
00:16 scflode joined #rest
00:18 shrink0r joined #rest
00:26 begriffs joined #rest
00:44 shrink0r_ joined #rest
00:45 shrink0r joined #rest
01:01 lemur joined #rest
01:17 scflode joined #rest
01:27 begriffs joined #rest
01:37 shrink0r_ joined #rest
02:02 rue joined #rest
02:18 scflode joined #rest
02:22 DrCode joined #rest
02:30 tr3onlin_ joined #rest
02:48 shrink0r joined #rest
03:19 scflode joined #rest
04:20 scflode joined #rest
04:37 lebster joined #rest
04:38 tmoore joined #rest
04:39 ekroon__ joined #rest
04:41 lemur joined #rest
05:03 lemur joined #rest
05:14 shrink0r_ joined #rest
05:15 shrink0r joined #rest
05:20 scflode joined #rest
05:24 proteusguy joined #rest
06:21 lemur joined #rest
06:21 scflode joined #rest
06:27 lemur joined #rest
06:44 proteusguy_ joined #rest
06:47 DrCode joined #rest
06:47 proteusguy__ joined #rest
07:22 scflode joined #rest
07:41 lemur joined #rest
07:50 rosstuck joined #rest
07:51 rosstuck joined #rest
07:53 tr3online joined #rest
08:13 shrink0r joined #rest
08:23 scflode joined #rest
08:26 tr3online joined #rest
09:06 graste joined #rest
09:28 lemur joined #rest
09:33 ruibritopt joined #rest
09:36 marcoslamuria joined #rest
09:49 SupaHam joined #rest
09:53 scflode joined #rest
10:01 shrink0r joined #rest
10:08 rincewind666 joined #rest
10:13 rincewind666 I have a resource that is posted somewhere (r1). And then I want to post that I have a relationship to that resource on another resource (r2). So I would like to post the id for that relationship. Would I do post api/r2/r1 with id (or ref_id) in body, or would i do post api/r2/ref_r1 with id in body?
10:13 martinfilliau joined #rest
10:14 trygvis you don't post IDs, you post URIs
10:14 trygvis you download r2, add the reference to r1 and POST r2 back to the server
10:25 Left_Turn joined #rest
10:26 rincewind666 ah, ok - thanks!
10:27 rincewind666 great answer
10:37 fumanchu_ joined #rest
10:43 Guest86856 joined #rest
10:45 Guest86856 Trying to get my head around a concept in REST. How do you deal with resources that have inter-dependencies, and maintaining data integrity? (like cascades if thinking in sql terminology)?
10:49 trygvis usually you make your resources coarse grained and self-consistent and use that as your resource type
10:56 PalyaPix joined #rest
10:58 Guest86856 trygvis: so, for example, what if there was a "tag" resource and a "photo" resource, where photos have tags, and you want to ensure that if a DELETE is issued on a tag, it only succeeds if that tag doesn't exist on any photos - I don't really get how to express such a system with REST?
11:09 PalyaPix joined #rest
11:23 scflode joined #rest
11:44 PalyaPix joined #rest
12:15 ramsey joined #rest
12:17 sulky joined #rest
12:22 imanc_ joined #rest
12:38 interop_madness joined #rest
12:49 interop_madness should empty sets be represented by http/404 or should the serialization account for empty sets? consider http://server/people/126510/relatives: what if 126510 has no relatives? suppose i request with Accept: application/vnd.peoplelist+xml, theoretically a http/200 response with body <People></People> would be possible
12:50 interop_madness what would also be possible is http/404, suggesting "no relatives found"
12:51 trygvis I would guess most hypermedias have support for empty sets
12:53 scflode joined #rest
12:55 nkoza joined #rest
13:39 interop_madness trygvis, so it's recommended to return 200 OK with an empty set instead of 404?
13:39 shrink0r joined #rest
13:41 trygvis I don't know if I can find a citation for it, but 404 usually indicates that the client did something silly
13:41 trygvis it's not like the list is not there, it's just empty
13:41 trygvis so I would definitely go for 200
13:45 proteusguy joined #rest
13:47 shrink0r joined #rest
14:13 lemur joined #rest
14:17 interop_madness ok tanks
14:17 interop_madness +h
14:30 philbot joined #rest
14:30 Topic for #rest is now #rest REpresentational State Transfer | logs: http://irclog.greptilian.com/rest/today |  http://tech.groups.yahoo.com/group/rest-discuss | http://code.google.com/p/implementing-rest/ | http://en.wikipedia.org/wiki/Representational_State_Transfer
14:48 shrink0r_ joined #rest
14:52 shrink0r joined #rest
14:52 shrink0r_ joined #rest
14:55 shrink0r joined #rest
15:09 Mxyzpltk joined #rest
15:23 znn joined #rest
15:26 DrCode joined #rest
15:53 scflode joined #rest
16:26 znn joined #rest
16:59 mezod joined #rest
17:23 scflode joined #rest
17:56 Mxyzpltk joined #rest
18:39 tr3online joined #rest
18:54 scflode joined #rest
19:41 znn joined #rest
19:46 shrink0r joined #rest
19:58 graste joined #rest
20:01 znn joined #rest
20:19 znn joined #rest
20:24 scflode joined #rest
20:33 shrink0r joined #rest
21:14 Mxyzpltk joined #rest
21:18 pdurbin HTTP POST with URL query parameters -- good idea or not? - Stack Overflow - http://stackoverflow.com/questions/611906/http-post-with-url-query-parameters-good-idea-or-not
21:18 pdurbin any opinions? :)
21:18 gamache I've never had a problem with URL params on a POST/PUT/PATCH
21:23 gamache I try to design my APIs so that they are usable from awful and perverse environments
21:23 gamache I can imagine a situation where it is convenient to put certain params on every request, and that's easier to do in the URL
21:25 pdurbin I'm hearing that https://code.google.com/p/rest-assured/ says the equivalent of "not a good idea". Won't let you do it.
21:29 gamache that sounds annoying
21:30 gamache I often dislike opinionated testing tools
21:31 gamache anyway this Stack Overflow post is specifically about having an empty POST body and all the payload on the URL
21:32 gamache that sounds kind of stupid in its contexxt
21:42 pdurbin well, I haven't tried it myself yet.
21:43 fumanchu_ stop reading W3C specs and read IETF ones. then query *strings* are just part of the URI and the method is irrelevant.
21:47 fumanchu_ everything before the # identifies the target resource
21:54 scflode joined #rest
21:58 rue_XIV joined #rest
22:07 znn joined #rest
22:53 marcosla_ joined #rest
23:03 marcoslamuria joined #rest
23:16 pdurbin fumanchu_: so you're saying POST with whatever in the URI (including query strings) is fine
23:17 fumanchu_ yep
23:20 pdurbin ok
23:24 scflode joined #rest
23:25 shrink0r_ joined #rest
23:37 znn joined #rest
23:42 whartung most frameworks do not distinguish between arguments in the URL and arguments in teh payload, especially if the arguments in the payload are form encoded.
23:44 pdurbin I'll have to play around with rest-assured some more. So far I like it.

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

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