greptilian logo

IRC log for #rest, 2015-03-13

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:20 SlippinJimmy joined #rest
00:50 SlippinJimmy joined #rest
00:55 vanHoesel joined #rest
01:06 shrink0r_ joined #rest
01:39 shrink0r joined #rest
02:30 vanHoesel joined #rest
02:39 lemur joined #rest
02:44 shrink0r joined #rest
03:04 znn joined #rest
03:05 znn i'm creating a like button for a user
03:05 znn a user can like a post
03:05 znn and user can toggle the like
03:05 znn i was thinking the request to the server should be something like this:
03:07 znn to like: POST api.example.com/posts action=like, user=user_id
03:07 znn to unlike: POST api.example.com/posts action=unlike, user=user_id
03:07 znn this doesn't seem very restful but i might be wrong
03:12 shrink0r_ joined #rest
03:39 lemur joined #rest
04:00 znn https://stackoverflow.com/questions/5665893/the-rest-way-to-check-uncheck-like-unlike-favorite-unfavorite-a-resource
04:01 znn POST posts/:id/likes/:userid
04:01 znn DELETE posts/:id/likes/:userid
04:01 znn i guess that's the valid way of doing this
04:41 ewalti joined #rest
04:43 ewalti_ joined #rest
05:49 composed joined #rest
07:01 ewalti joined #rest
07:56 _ollie joined #rest
09:00 azr joined #rest
09:09 ewalti joined #rest
09:35 shrink0r joined #rest
09:52 Left_Turn joined #rest
09:55 azr joined #rest
10:00 _ollie joined #rest
10:37 vanHoesel joined #rest
10:52 vanHoesel joined #rest
10:56 azr joined #rest
11:07 graste joined #rest
11:15 ewalti joined #rest
11:17 vanHoesel joined #rest
11:22 ewalti joined #rest
11:26 gypsymauro joined #rest
11:30 gypsymauro hi, suppose I need to create a REST API that allows me to create a record and add an attachment, suppose that I'm using a DMS for storing the file and that DMS exposes a REST interface.. then, is a good idea to have a single REST entry point that I can call with a POST and a JSON with metadata and the base64 rapresentation of the file so the method can control all the process or the correct way is that the client calls one method for the data and another
11:50 vanHoesel joined #rest
11:55 pdurbin gypsymauro: what you're talking about reminds me of http://swordapp.github.io/SWORDv2-Profile/SWORDProfile.html#protocoloperations_creatingresource_multipart
11:55 pdurbin where XML is sent as well as a binary
11:56 pdurbin Content-Type: multipart/related
12:03 trygvis that is one way, or you can go all out and create an endpoint that can take the data and metadata
12:24 dEPy joined #rest
12:25 _ollie joined #rest
12:25 mezod joined #rest
13:06 azr joined #rest
13:23 vanHoesel joined #rest
13:58 graste joined #rest
14:35 jgornick joined #rest
14:35 saml joined #rest
14:37 rosstuck joined #rest
15:35 znn joined #rest
15:36 znn what is the best way to allow a user to like/unlike a comment or a post?
15:36 znn i asked this last night, but i guess most people were away or sleeping :)
15:36 znn a like: POST posts/:id/likes/:userid
15:36 znn an unlike: DELETE posts/:id/likes/:userid
15:37 znn is there a better way than this?
15:41 gamache there is no single "best way", but in this case I think PUT makes more sense than POST, in that it is idempotent
15:44 znn gamache: is DELETE idempotent as well?
15:44 gamache it is
15:44 lemur joined #rest
15:44 gamache you can delete the same resource 100 times and it's just as gone as the first time :)
15:53 mezod joined #rest
16:44 zama joined #rest
16:45 mezod joined #rest
16:57 pdurbin joined #rest
17:56 vanHoesel joined #rest
18:37 shrink0r joined #rest
19:27 azr joined #rest
19:50 shrink0r joined #rest
20:01 mezod joined #rest
20:22 azr joined #rest
20:27 azr_ joined #rest
20:28 graste joined #rest
20:41 mezod joined #rest
21:32 digitalsanctum joined #rest
21:48 vanHoesel joined #rest
21:54 _ollie joined #rest
21:55 vanHoesel joined #rest
22:02 vanHoesel joined #rest
22:12 vanHoesel joined #rest
23:19 ewalti joined #rest
23:20 ewalti_ joined #rest

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

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