| Time |
S |
Nick |
Message |
| 00:05 |
|
|
Left_Turn joined #rest |
| 00:07 |
|
|
fuzzyhorns joined #rest |
| 01:27 |
|
|
gblfxt joined #rest |
| 01:29 |
|
|
fuzzyhorns joined #rest |
| 01:34 |
|
|
whartung joined #rest |
| 01:36 |
|
|
Coldblackice joined #rest |
| 01:41 |
|
|
tbsf joined #rest |
| 02:14 |
|
|
blongden_ joined #rest |
| 02:48 |
|
|
lemur joined #rest |
| 03:29 |
|
|
Coldblackice joined #rest |
| 03:49 |
|
|
baweaver joined #rest |
| 04:46 |
|
|
baweaver joined #rest |
| 04:56 |
|
|
fumanchu joined #rest |
| 05:51 |
|
|
tbsf joined #rest |
| 07:41 |
|
|
leolove joined #rest |
| 08:03 |
|
|
Macaveli joined #rest |
| 08:09 |
|
|
timg____ joined #rest |
| 08:09 |
|
|
timg____ joined #rest |
| 08:30 |
|
|
sdeh joined #rest |
| 08:39 |
|
|
interop_madness joined #rest |
| 08:42 |
|
|
_ollie joined #rest |
| 08:44 |
|
|
whartung_ joined #rest |
| 08:52 |
|
|
leolove joined #rest |
| 08:58 |
|
|
SupaHam joined #rest |
| 08:58 |
|
|
SupaHam joined #rest |
| 09:29 |
|
|
_ollie joined #rest |
| 09:35 |
|
|
fumanchu_ joined #rest |
| 09:36 |
|
|
Macaveli joined #rest |
| 09:50 |
|
|
Lachezar joined #rest |
| 09:51 |
|
Lachezar |
Hey all. In a REST-style application what VERB, request and response is common for performing server-side tasks? Like close(), recalculate(), synchronize(), etc. |
| 09:52 |
|
trygvis |
POST |
| 09:52 |
|
Lachezar |
trygvis: so POST /type/id/close ? |
| 09:53 |
|
trygvis |
the URL is never interresting |
| 09:53 |
|
trygvis |
for closing a task (or whatever) you can PUT the resource back with state=close |
| 09:53 |
|
Lachezar |
trygvis: I meant: the 'action' will be part of the path, or part of the request? |
| 09:53 |
|
trygvis |
or the original resource will tell you where and what to do to close it |
| 09:55 |
|
trygvis |
the resource will tell you, like hateoas explains |
| 09:58 |
|
* Lachezar |
doesn't get that. "These are not the techniquest you're looking for!" |
| 10:00 |
|
|
baweaver joined #rest |
| 10:28 |
|
|
quimrstorres joined #rest |
| 10:32 |
|
|
fumanchu joined #rest |
| 11:57 |
|
pdurbin |
Lachezar: don't get what? |
| 11:58 |
|
pdurbin |
trygvis: so you like keeping "close" (or whatever) out of the path and putting it inside the body of PUT instead? |
| 11:59 |
|
trygvis |
as I think I say in every conversation, the URI is never significant and never created by the client :) |
| 11:59 |
|
trygvis |
it can still be in the path, but then the origin resource and mediatype specified it |
| 11:59 |
|
pdurbin |
trygvis: I know you always say that URIs don't matter. I'm asking what you do when designing a back end |
| 12:01 |
|
Lachezar |
pdurbin: It looks to me like REST is putting most processing client-side. That's not what I'm looking for. |
| 12:02 |
|
|
baweaver joined #rest |
| 12:04 |
|
trygvis |
pdurbin: it depends, but unless close is nothing more than marking a task as done and sending an email I think it would be fine to just PUT a new resource with state=closed |
| 12:05 |
|
trygvis |
an alternative is to have a link from the item itself to where a client can post a special document to do the closing |
| 12:05 |
|
trygvis |
we do something similar |
| 12:05 |
|
trygvis |
ops |
| 12:06 |
|
trygvis |
we have an API to create invoices, those can be sent from our server through different transports (email and EHF) but that is done through a special "document sending service" |
| 12:22 |
|
|
_ollie joined #rest |
| 12:25 |
|
pdurbin |
trygvis: ok. PUT a new resource with state=closed makes sense. thanks |
| 12:47 |
|
|
eschmidbauer joined #rest |
| 12:48 |
|
|
eschmidbauer left #rest |
| 13:02 |
|
|
nesselbosch joined #rest |
| 13:03 |
|
|
mezod joined #rest |
| 13:46 |
|
|
leolove joined #rest |
| 14:03 |
|
|
mezod joined #rest |
| 14:04 |
|
|
baweaver joined #rest |
| 14:24 |
|
|
tbsf joined #rest |
| 14:39 |
|
|
tbsf joined #rest |
| 14:49 |
|
|
Lachezar left #rest |
| 14:58 |
|
|
mezod joined #rest |
| 15:39 |
|
|
leolove joined #rest |
| 16:01 |
|
|
mooncup joined #rest |
| 16:05 |
|
|
baweaver joined #rest |
| 16:05 |
|
|
StatelessCat joined #rest |
| 16:06 |
|
trygvis |
nice cat |
| 16:08 |
|
|
asm89 joined #rest |
| 16:13 |
|
|
timg_____ joined #rest |
| 16:24 |
|
|
tbsf joined #rest |
| 16:30 |
|
|
chthon joined #rest |
| 16:36 |
|
|
mezod joined #rest |
| 16:38 |
|
|
baweaver joined #rest |
| 16:42 |
|
|
ramsey joined #rest |
| 16:44 |
|
|
ChrisAnn joined #rest |
| 17:38 |
|
|
_ollie joined #rest |
| 17:39 |
|
|
tbsf joined #rest |
| 17:43 |
|
|
fuzzyhorns joined #rest |
| 18:36 |
|
|
sdeh joined #rest |
| 18:44 |
|
|
fuzzyhorns joined #rest |
| 18:47 |
|
|
lemur joined #rest |
| 19:02 |
|
|
sdeh joined #rest |
| 19:24 |
|
|
Macaveli joined #rest |
| 19:25 |
|
|
_ollie joined #rest |
| 19:25 |
|
|
Macaveli joined #rest |
| 19:26 |
|
|
Macaveli joined #rest |
| 19:51 |
|
|
Coldblackice joined #rest |
| 20:46 |
|
|
fuzzyhorns joined #rest |
| 20:48 |
|
|
baweaver joined #rest |
| 22:00 |
|
|
anth0ny joined #rest |
| 22:45 |
|
|
baweaver joined #rest |
| 22:49 |
|
|
fuzzyhorns joined #rest |
| 23:36 |
|
|
speeder_ joined #rest |
| 23:37 |
|
speeder_ |
some guy asked me to make a "RESTFUL" app, gave me no server, no info, and I have to deliver it soon. (and I hate making client/server stuff), I managed to find a json-based test rest server, and send data to it... but the results are weird |
| 23:38 |
|
pdurbin |
speeder_: if not client/server, what do you like? |
| 23:40 |
|
speeder_ |
I send a json (like {"test":1, "anotherTest":5125}) and the server saves: { "{/"test/":1,/"anotherTest/":5125}":"" "id":1} |
| 23:40 |
|
speeder_ |
so what I did wrong? |
| 23:41 |
|
speeder_ |
pdurbin: I am a game programmer... I like writing the game rules, physics, mechanics, etc... but I can't be choosy on what jobs I take now. |
| 23:41 |
|
pdurbin |
those results don't seem especially weird. what do you mean? |
| 23:42 |
|
speeder_ |
pdurbin: it is not saving test, and anotherTest as 2 numbers, it is saving my whole json as a identifier. |
| 23:45 |
|
pdurbin |
have we heard of this "json-based test rest server"? is it open source? |
| 23:45 |
|
speeder_ |
https://github.com/typicode/json-server |
| 23:49 |
|
|
fuzzyhorns joined #rest |
| 23:54 |
|
|
fred-fri joined #rest |
| 23:55 |
|
pdurbin |
looks like we can play with the same thing at http://jsonplaceholder.typicode.com/posts |
| 23:55 |
|
fred-fri |
GET user/1 returns 200 and user with ID 1. What about GET user/x where no user with ID x exists? 400? 204? 404? |
| 23:56 |
|
pdurbin |
http://jsonplaceholder.typicode.com/posts/1 etc |
| 23:58 |
|
pdurbin |
speeder_: do you get the same results when you POST to that server? |
| 23:58 |
|
speeder_ |
pdurbin: I don't tried posting to the site, only to a local version |
| 23:58 |
|
speeder_ |
I will test |
| 23:58 |
|
pdurbin |
fred-fri: 404 I guess |
| 23:58 |
|
speeder_ |
brb |