Time |
S |
Nick |
Message |
00:11 |
|
|
shrink0r_ joined #rest |
00:40 |
|
|
philbot joined #rest |
00:40 |
|
|
Topic for #rest is now #rest REpresentational State Transfer | logs: http://irclog.greptilian.com/rest/today | http://tech.groups.yahoo.com/group/rest-discuss | http://code.google.com/p/implementing-rest/ | http://en.wikipedia.org/wiki/Representational_State_Transfer |
00:55 |
|
|
shrink0r joined #rest |
01:08 |
|
|
shrink0r_ joined #rest |
01:40 |
|
|
shrink0r joined #rest |
01:50 |
|
|
shrink0r_ joined #rest |
01:57 |
|
|
shrink0r joined #rest |
01:59 |
|
|
shrink0r_ joined #rest |
03:15 |
|
|
shrink0r joined #rest |
03:21 |
|
|
shrink0r_ joined #rest |
04:07 |
|
|
shrink0r joined #rest |
04:20 |
|
|
shrink0r joined #rest |
04:44 |
|
|
Angry_Roy_Fieldi joined #rest |
04:44 |
|
Angry_Roy_Fieldi |
Is using a 303 redirect to the updated resource an acceptable action after a POST? |
04:49 |
|
dreamdust |
No. |
04:50 |
|
dreamdust |
Return a 200, or if a resource was created, a 201. |
04:52 |
|
dreamdust |
You can send a 303 though. It's just stupid since the client can always go there if they want. |
04:53 |
|
Angry_Roy_Fieldi |
dreamdust: ok, will clarify in sec. |
04:55 |
|
Angry_Roy_Fieldi |
I have a /user/portrait resource which accepts a POST. it updates the user portrait. I’m not sure if I should return a user object (which will contains a links attribute), or just a links attribute, or something else altogether |
04:56 |
|
Angry_Roy_Fieldi |
I’m also thinking that /user/portrait is probably better served as a PATCH to /user |
04:58 |
|
dreamdust |
Typically, you would have a collection of users at /users and you would POST there to create them. In the response is the created resource along with a Location header pointing to the URL for it. Updating the resource is done with a PATCH to the resource at /users/:id. PATCH should also preferably follow standard semantics like JSON-Patch. |
05:01 |
|
dreamdust |
problem with the 303 is that its convenient for clients to get the representation of the created resource in the response, rather than being forced to fetch it |
05:01 |
|
dreamdust |
and they can always fetch it if they want |
05:01 |
|
Angry_Roy_Fieldi |
dreamdust: makes sense. What if the client is uploading an image (using either Content-Type, or as multipart/form-data)? |
05:01 |
|
Angry_Roy_Fieldi |
can PATCH be used there, or is there a better alternative? |
05:03 |
|
Angry_Roy_Fieldi |
(that’s my last question, btw) |
05:03 |
|
dreamdust |
You can use PATCH there |
05:03 |
|
Angry_Roy_Fieldi |
ok, thanks. I appreciate your time. |
05:04 |
|
dreamdust |
http://tools.ietf.org/html/rfc5789#section-2 |
05:04 |
|
dreamdust |
http://stackoverflow.com/questions/17375867/proper-way-to-include-data-with-an-http-patch-request |
05:04 |
|
dreamdust |
think of put == replace, patch == update |
05:12 |
|
|
proteusguy joined #rest |
07:53 |
|
|
philbot joined #rest |
07:53 |
|
|
Topic for #rest is now #rest REpresentational State Transfer | logs: http://irclog.greptilian.com/rest/today | http://tech.groups.yahoo.com/group/rest-discuss | http://code.google.com/p/implementing-rest/ | http://en.wikipedia.org/wiki/Representational_State_Transfer |
07:58 |
|
|
shrink0r joined #rest |
08:18 |
|
|
pdurbin joined #rest |
09:46 |
|
|
shrink0r joined #rest |
10:50 |
|
|
Left_Turn joined #rest |
10:52 |
|
|
tr3online joined #rest |
10:52 |
|
|
warehouse13 joined #rest |
10:53 |
|
|
Left_Turn joined #rest |
11:16 |
|
|
adaro joined #rest |
11:59 |
|
|
proteusguy joined #rest |
12:15 |
|
|
Left_Turn joined #rest |
12:44 |
|
|
mezod joined #rest |
14:04 |
|
|
DrCode joined #rest |
14:06 |
|
|
quimrstorres joined #rest |
14:36 |
|
|
_ollie1 joined #rest |
15:07 |
|
|
DrCode joined #rest |
16:06 |
|
|
quimrstorres joined #rest |
17:40 |
|
|
shrink0r joined #rest |
18:20 |
|
|
shrink0r joined #rest |
18:26 |
|
|
shrink0r_ joined #rest |
18:31 |
|
|
shrink0r joined #rest |
19:06 |
|
|
quimrstorres joined #rest |
19:35 |
|
|
Angry_Roy_Fieldi joined #rest |
19:48 |
|
|
shrink0r joined #rest |
19:54 |
|
|
MLMitch joined #rest |
21:11 |
|
|
Andre-B joined #rest |
22:01 |
|
|
shrink0r_ joined #rest |
23:24 |
|
|
aGHz joined #rest |
23:30 |
|
|
quimrstorres joined #rest |
23:34 |
|
|
quimrstorres joined #rest |
23:35 |
|
|
adaro joined #rest |
23:43 |
|
|
mezod joined #rest |
23:44 |
|
|
asm89 joined #rest |
23:46 |
|
|
gamache joined #rest |
23:48 |
|
|
quimrstorres joined #rest |
23:48 |
|
|
benaiah joined #rest |
23:54 |
|
|
vlakarados joined #rest |
23:58 |
|
|
quimrstorres joined #rest |