greptilian logo

IRC log for #rest, 2016-03-14

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
01:00 pgicxplzs joined #rest
02:37 tbsf joined #rest
02:52 tbsf joined #rest
05:07 tbsf joined #rest
05:09 Coldblackice joined #rest
06:08 tbsf joined #rest
07:09 tbsf joined #rest
07:16 searchbot joined #rest
07:16 DrCode joined #rest
07:16 blongden_ joined #rest
07:16 StatelessCat joined #rest
07:16 spaceone joined #rest
07:29 nesselbosch joined #rest
08:32 gigo1980 joined #rest
09:09 interop_madness joined #rest
09:45 tbsf joined #rest
09:52 gigo1980 joined #rest
10:05 timg___ joined #rest
10:08 quimrstorres joined #rest
10:31 moldy joined #rest
10:31 moldy hi
10:33 moldy i want to provide an interface for a client to verify that the attribute of a certain object that the client is about to POST is unique (e.g. that a username is not taken yet)
10:33 moldy which method should i use here? i tend to say POST to avoid caching, but the request doesn't change the server state
11:46 tbsf joined #rest
12:12 timg___ joined #rest
12:50 StatelessCat moldy: why not doing a GET and use the return code as the anwser ?
12:50 moldy StatelessCat: you mean 404 to mean "free"?
12:51 moldy StatelessCat: hmm. not sure. in my case, a number can be unavailable even if it doesn't publicly exist.
12:52 StatelessCat 404 means free, yes that's what i suggested
12:52 moldy StatelessCat: i am using a "soft-delete" logic. if object with number 1 gets soft-deleted, i still treat that number as unavailable, but /objects/1 will 404.
12:54 moldy so a dedicated validator endpoint seems to be more clean to me. here is my current server-side code (python/django): https://dpaste.de/9dYM
12:54 StatelessCat moldy: in case the ressource exists but is not authorised for public access, you can return HTTP 401 http://httpstatusdogs.com/401-unauthorized
12:55 moldy StatelessCat: hmm, i guess i could do that, but it would leak which instances are deleted. not sure.
12:55 moldy so far, my approach was to hide the soft-deletion logic as much as possible
12:55 moldy but maybe that approach was not very clever :)
13:18 StatelessCat moldy: zith so nuch logic behind on the identifier, Maybe identifiers can be Ressources 1
13:19 StatelessCat and you will uses /identifiers/12344 as a Resource
13:20 moldy StatelessCat: hmm, that may be an idea
13:36 crystal77 joined #rest
13:52 tbsf joined #rest
14:35 eschmidbauer joined #rest
14:50 tbsf joined #rest
14:56 timg____ joined #rest
14:59 timg_____ joined #rest
15:58 tbsf joined #rest
16:00 FritzLakritz joined #rest
16:45 Macaveli joined #rest
17:31 Macaveli joined #rest
18:26 timg___ joined #rest
18:31 timg___ joined #rest
18:36 Devastator_ joined #rest
18:40 Devastator_ joined #rest
19:12 gigo1980 joined #rest
21:42 Coldblackice joined #rest
22:48 timg___ joined #rest
22:53 timg___ joined #rest

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

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