greptilian logo

IRC log for #rest, 2017-05-08

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
05:14 wsieroci joined #rest
05:15 wsieroci_ joined #rest
05:44 wsieroci joined #rest
05:54 wsieroci joined #rest
06:19 daxim joined #rest
07:09 Haudegen joined #rest
13:50 Haudegen joined #rest
13:51 wsiqueir joined #rest
14:29 Haudegen joined #rest
15:04 Norrin joined #rest
15:15 Norrin joined #rest
15:25 Norrin joined #rest
18:38 arrpeegeee joined #rest
18:38 wsieroci joined #rest
21:05 Flaghacker joined #rest
21:07 Flaghacker I'm following a tutorial on making a Rest-api with spring boot, and the guy made the delete method also require you to send the item you want to delete along with the DELETE request to /api/items/<id>. Is there a reason for this? Couldn't I just leave it out? (for the record, this is the tutorial: https://www.youtube.com/watch?v=mrrHTJxppi8)
21:17 whartung you mean he has you pass the ID as a payload for the DELETE request? not just rely on the URI?
21:23 Flaghacker whartung, No he has me pass the entire item to be deleted
21:23 Flaghacker But that feels very strange to me
21:23 whartung what do you mean “the entire item to be deleted”?
21:24 impl Flaghacker: it could be for conflict resolution. so you can compare what you intend to delete to what's actually stored.
21:24 whartung what does the DELETE command look like?
21:24 whartung DELETE /api/items/123
21:25 Flaghacker Yes, but with a body that contains the item in JSON-form.
21:25 Flaghacker It looks like this on my tester: http://i.imgur.com/eBn6jkR.png
21:25 whartung ic
21:26 Flaghacker What does "ic" mean?
21:27 whartung I see
21:27 impl "i see"
21:27 Flaghacker Ah okay
21:28 whartung There’s technically nothing wrong with having a payload associated with the DELETE request. But I don’t do that.
21:28 whartung you can achieve conflict resolution by using an etag
21:28 whartung as well as the last-modified headers, etc.
21:28 whartung no need to send the entire thing, but that’s me
21:30 Flaghacker It's strange that he doesn't explain why he needs it, but it'll probably be for something down the road, like conflict resolution.
21:30 impl yeah, it seems weird to me as well... that's the only reason i could think of though
21:30 Flaghacker Thanks for explaining!
21:32 whartung yw
21:37 wsieroci joined #rest
21:41 ResidentBiscuit joined #rest
21:41 ResidentBiscuit joined #rest
21:41 ResidentBiscuit joined #rest
22:04 wsieroci joined #rest
22:13 ResidentBiscuit joined #rest
22:41 ramsey joined #rest
23:37 Norrin joined #rest

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

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