greptilian logo

IRC log for #rest, 2014-09-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
03:11 tr3online joined #rest
03:18 igitoor joined #rest
03:28 DrCode joined #rest
03:30 igitoor joined #rest
04:06 proteusguy_ joined #rest
04:23 tr3online joined #rest
06:05 proteusguy joined #rest
07:49 tr3online joined #rest
08:23 tr3online joined #rest
08:44 tr3online joined #rest
08:53 tr3online joined #rest
09:32 shevy joined #rest
09:32 shevy left #rest
09:43 siwica joined #rest
09:52 adaro joined #rest
10:29 siwica joined #rest
10:46 adaro joined #rest
11:36 Left_Turn joined #rest
12:53 ph88 joined #rest
13:16 siwica joined #rest
13:50 siwica When sending a file to the server which is not supposed to stay there (just some data gets extracted) which is the appropriate request: POST or PUT?
13:53 * pdurbin votes for POST
13:54 siwica pdurbin: and what is the canonical way to send file content (textual) via a POST request? just an arbitrary key-value par with value being the file  content?
13:54 siwica *pair
13:55 pdurbin multipart, I would think
13:57 trygvis there is no canonical way to do that
13:57 pdurbin "Content-Type should be set to multipart/form-data" https://dev.twitter.com/rest/reference/post/statuses/update_with_media
13:58 trygvis twitter is a classic RPC API, not anywhere near REST
13:59 pdurbin siwica: are you going for REST or "whatever works"? :)
13:59 siwica pdurbin: not sure yet :)
14:00 trygvis do you want to send a set of key/value pairs plus the file itself?
14:00 * pdurbin wonders if there's a #restful or #whateverworks channel
14:00 siwica pdurbin: I want to pass a file to the server, the server extracts multiple entities from it and privides GET access to each of those
14:00 siwica The file is XML
14:00 siwica And I only want to send the file itself
14:01 trygvis then POST the file to your service
14:02 trygvis PUT is expected to be a complete representation of the resource you're replacing, while POST has no such ideas
14:03 siwica trygvis: Ok, I see
14:05 siwica pdurbin: What does "multipart/form-data" do, if I am only sending a single file with nothing else?
14:10 trygvis it enabled you to send more than one file in a single container, usually it's used to send two files, one which contains instructions and one that is the 'main' payload
14:10 trygvis enables
14:10 trygvis and saying 'usually' is probably not right, but it can be used to do that at least
14:19 siwica Ok, I see
14:43 rosstuck joined #rest
14:59 pdurbin trygvis: no canonical way? REST doesn't specify a way?
15:40 mamund pdurbin: "REST doesn't specify a way?" -- that's correct.
15:41 mamund REST is not a protocol, it's a style like impressionism or swedish modern, etc.
15:41 mamund HTTP is a protocol and has several specifications.
15:42 pdurbin sure does. several efforts to summarize and reconcile the various specs
15:42 mamund one of the specs related to HTTP is the "multipart/form-data" spec (RFC2388)
15:42 mamund https://www.ietf.org/rfc/rfc2388.txt
15:43 mamund this is a spec for transfering whole files.
15:43 mamund hope that helps.
15:43 pdurbin It does. Thanks. I wasn't aware of that RFC.
15:43 mamund np
15:43 mamund it's a bit dated, but it's the one browsers supprt
15:44 mamund and most frameworks has built-in support for it, too.
15:44 mamund makes it easy to implement for both servers and clients.
15:45 pdurbin cool
15:49 felipernb joined #rest
17:06 ttahmouch joined #rest
17:14 DrCode joined #rest
17:15 felipernb joined #rest
17:22 felipernb joined #rest
17:29 DrCode joined #rest
17:31 ordnungswidrig1 joined #rest
17:39 ordnungswidrig joined #rest
17:44 ordnungswidrig1 joined #rest
17:54 ordnungswidrig joined #rest
17:56 ordnungswidrig1 joined #rest
17:59 ordnungswidrig joined #rest
18:05 ordnungswidrig1 joined #rest
18:09 ordnungswidrig joined #rest
18:11 ordnungswidrig joined #rest
18:18 tr3online joined #rest
18:23 ordnungswidrig joined #rest
18:32 tr3online joined #rest
18:43 ordnungswidrig joined #rest
18:48 tr3online joined #rest
19:33 siwica joined #rest
20:17 tr3online joined #rest
22:18 ttahmouch joined #rest
23:50 tr3online joined #rest

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

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