greptilian logo

IRC log for #rest, 2015-03-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
04:13 mgomezch joined #rest
08:48 shrink0r joined #rest
08:56 azr joined #rest
09:10 azr joined #rest
09:29 interop_madness joined #rest
09:35 Left_Turn joined #rest
10:50 ewalti joined #rest
11:35 azr joined #rest
12:05 mezod joined #rest
12:25 azr joined #rest
12:41 shrink0r_ joined #rest
12:43 dEPy joined #rest
13:38 aGHz joined #rest
13:56 azr joined #rest
14:15 saml joined #rest
14:18 Andre-B joined #rest
14:19 Andre-B in a restful api, with a search endpoint, if the search does not yield any results, shall I return http status: 200 and empty array, or http status 204 no body.
14:19 Andre-B having a nice discussion about this right now with a coworker
14:21 trygvis I would return 200 and empty body
14:21 trygvis s,body,array,
14:21 gamache 200 with [] seems less surprising to me
14:23 gamache though I tend to make my query responses look more like {results: []} with some other attributes on there too, like _links
14:24 trygvis yep, me too
14:26 shrink0r joined #rest
14:29 nkoza joined #rest
14:39 shrink0r_ joined #rest
14:45 pdurbin yeah, I return 200 with {"status":"OK","data":{"item​s":[],"count_in_response":0 ...
14:45 pdurbin http://guides.dataverse.org/en/latest/api/search.html
15:14 mezod joined #rest
15:22 azr joined #rest
15:26 ralphschindler joined #rest
15:36 azr joined #rest
16:33 lemur joined #rest
16:49 Mxyzpltk joined #rest
17:06 trygvis pdurbin: why the "status" field?
17:07 trygvis and the data-field, I would think just the value of "data" should be the payload
17:09 fumanchu_ trygvis: http://beachpackagingdesign.com/wp-content/uploads/boxvox/6a00e54f0014bd88340134892d2314970c.jpg
17:14 * fumanchu_ has seen client frameworks that don't provide access to HTTP status nearly as easily as they do to the payload
17:28 pdurbin trygvis: we always return a status. another example: {"status":"ERROR","message":"q parameter is missing"}
17:31 fumanchu_ pdurbin: what HTTP status is returned with that payload?
17:32 pdurbin 400 Bad Request
18:46 adaro joined #rest
18:52 trygvis if you have a rest framework that doesn't give access to the status code, use another framework
18:52 trygvis tunnelling the status code in the document is really suboptimal design
18:55 pdurbin trygvis: as I said, we return 200 or 400 depending
18:57 trygvis it's still a wtf
19:00 whartung could just be extra verbage to clafify details of the status code trygvis
19:01 whartung or, if could be a direct affrontage to your family heritage. Hard to tell from here. ;)
19:02 shrink0r joined #rest
19:04 pdurbin trygvis: what if it said "message"? If leave off the "q" (query) at https://api.github.com/search/repositories it says "message": "Validation Failed" (and has an array of errors with "q... missing")
19:05 pdurbin maybe you just object to it being "status" instead of "message"
19:06 pdurbin I guess "status" has a special meaning for HTTP.
19:17 tr3online joined #rest
19:29 Andre-B joined #rest
20:04 Andre-B_ joined #rest
20:16 rosstuck joined #rest
20:38 shrink0r_ joined #rest
20:38 trygvis pdurbin: feels better, then you're adding information to the http status code
20:39 trygvis I don't object to the name itself, mainly that it seemed to be a copy of the data from the http layer
20:39 trygvis (but I would probably go for another name myself :))
20:43 pdurbin trygvis: I'll point the guy who wrote the code to this conversation and see what he thinks. thanks
20:47 trygvis ;)
20:52 blahdeblah joined #rest
20:52 blahdeblah joined #rest
21:11 pdurbin I mean, we're supposed to ship real soon now so who knows if we'll change anything.
21:11 pdurbin whartung: which reminds me, more success with shib these days: http://irclog.iq.harvard.edu/dataverse/2015-03-16#i_17107
21:12 whartung nice
21:12 whartung oh I read your command presentation -- that was pretty good
21:13 pdurbin oh! glad you liked it. it was with the same guy who added the "status" message :)
21:13 whartung :)
21:13 pdurbin so I'll only have to send him one link to these logs
21:14 pdurbin whartung: you don't think we should have just used Spring Security? sometimes I wonder
21:14 whartung I can't speak to it, I don't use spring, not famliar with it's capabilities
21:28 shrink0r joined #rest
21:36 Andre-B joined #rest
21:49 ralphschindler joined #rest
22:08 ralphschindler joined #rest
22:11 ralphschindler joined #rest
22:15 pdurbin whartung: did you write your own permission system? did we talk about this already?
22:15 whartung I don't think so
22:15 whartung "yes" lol
22:22 pdurbin I mean, in Django or whatever there's some sort of permission system built in you can just use.
22:22 whartung no doubt
22:23 whartung no, we wrote our own roles/priveleges system
22:23 whartung …of course...
22:24 pdurbin like you do
22:24 whartung it's the way I roll
22:24 whartung or, role even
22:24 * pdurbin groans
22:27 pdurbin :)
22:27 pdurbin whartung: and you'd do it again? nothing off the shelf is good enough?
22:28 whartung I dunno. I'd have to look. I wouldn't use Spring, that's just me.  So I'd have to find something else.
22:29 pdurbin I've never used Spring but some people and work won't touch it.
22:29 whartung well, the simple truth is that Spring is like getting a piece of personal electronics in Europe and bringing it home, finding that it won't fit your plugs
22:31 whartung I just don't have the time and energy to "learn spring", especially for something like a collection of roles and identity.
22:31 pdurbin you could move! ;)
22:31 whartung what we USE is the JEE Principal and UserInRole
22:31 whartung yea, exactly
22:31 whartung that's what it would be like
22:31 whartung moving to europe
22:31 whartung everythings the same, but it's all different at the same time
22:32 whartung they drive on the wrong side of the road over there
22:34 pdurbin it's hard to tell what temperature it is, how much anything weighs
22:34 whartung damn skippy
22:34 whartung food tastes funny too
22:36 whartung (Paris has the worlds best ham and cheese sandwiches…I dunno what it is, every block and 3 or 4 stores that sells them, they're ham..and..cheese….and they're awesome. I had one in the airport before I left, it was awesome too -- in the AIRPORT! High cuisine (/snort) indeed!)
22:36 pdurbin so healthy tasting
22:39 whartung pdurbin: this is our daily existence in the Stripes channel. https://www.dropbox.com/s/udo5b7wgdspky02/Screenshot%202015-03-16%2015.39.11.png?dl=0
22:42 pdurbin heh. this happens all the time in #circuits
23:23 SupaHam joined #rest
23:28 pdurbin trygvis: if you want to argue with that guy I @mentioned him here: https://twitter.com/philipdurbin/status/577580004583804928 :)
23:56 adaro_ joined #rest

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

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