[00:15:06] DracoBlue (~Adium@ip-vlan-obckunde-02-217-66-60-14.pixelpark.net) joined #rest. [00:30:50] DracoBlue (~Adium@ip-vlan-obckunde-02-217-66-60-14.pixelpark.net) left #rest. [00:34:33] Ngarthl (erlenha@colargol.tihlde.org) joined #rest. [01:05:26] grove (~grove@aggw006.cappelendamm.no) joined #rest. [01:05:55] DracoBlue (~Adium@ip-vlan-obckunde-02-217-66-60-14.pixelpark.net) joined #rest. [01:06:02] DracoBlue (~Adium@ip-vlan-obckunde-02-217-66-60-14.pixelpark.net) left #rest. [01:35:49] DracoBlue (~Adium@ip-vlan-obckunde-02-217-66-60-14.pixelpark.net) joined #rest. [01:36:47] DracoBlue (~Adium@ip-vlan-obckunde-02-217-66-60-14.pixelpark.net) left irc: Client Quit [02:12:07] DracoBlue (~Adium@ip-vlan-obckunde-02-217-66-60-14.pixelpark.net) joined #rest. [02:16:17] DracoBlue (~Adium@ip-vlan-obckunde-02-217-66-60-14.pixelpark.net) left irc: Ping timeout: 240 seconds [02:21:18] DracoBlue (~Adium@ip-vlan-obckunde-02-217-66-60-14.pixelpark.net) joined #rest. [02:22:19] DracoBlue (~Adium@ip-vlan-obckunde-02-217-66-60-14.pixelpark.net) left #rest. [03:21:52] Split (~split@84.34.147.60) left irc: Ping timeout: 244 seconds [03:37:46] DracoBlue (~Adium@ip-vlan-obckunde-02-217-66-60-14.pixelpark.net) joined #rest. [03:37:49] DracoBlue (~Adium@ip-vlan-obckunde-02-217-66-60-14.pixelpark.net) left #rest. [03:39:56] Split (~split@84.34.147.60) joined #rest. [03:46:22] DracoBlue (~Adium@ip-vlan-obckunde-02-217-66-60-14.pixelpark.net) joined #rest. [03:46:25] DracoBlue (~Adium@ip-vlan-obckunde-02-217-66-60-14.pixelpark.net) left #rest. [04:16:44] cwb (~user@russell.carlbaatz.com) joined #rest. [04:27:45] Gandalf84 (~Gandalf84@93-50-97-97.ip152.fastwebnet.it) joined #rest. [04:27:52] hi [04:28:09] can somebody please suggest me a tutorial on how to handle image uploading from rest web service? [04:32:13] which media type are you using for your rest application? [04:42:51] JSON, so i can handle multiple info [04:42:57] what you suggest about it? [04:43:36] JSON is not a hypermedia [04:44:12] you can always use json as a format for your hypermedia, and in your description of the hypermedia you can explain how applications should upload images [04:45:57] is good for you to upload an image as a string in JSON? [04:46:14] {image:"3v24v23j423h4v4vk2jh34v2kjh34bv2kj4v2kj3h4"} [04:46:24] something like this [04:46:47] that sounds crazy [04:46:58] :D [04:47:32] I have to send an image from Iphone (i'm developing the app) to my WS [04:47:41] i don't know how to do it [04:48:36] { ..., "image-upload-url": "http://../uploads" } is probably fine, but not very REST-ful [04:49:29] i have to send raw data [04:49:51] right, so just POST to image-upload-url [04:50:08] yes but how can i handle than? [04:51:03] I don't see the problem [04:51:30] i don't know how to define the function that have to handle raw data and convert to a file [04:52:31] then you should probably ask the people who made your http framework [04:52:48] I'm making it [04:53:06] I doubt that [04:53:11] :D [04:53:22] i'm developing both iphone and server side [04:53:41] it's the first time i develop java WS [04:53:51] yes, and on the server side you're using some framework to do the http stuff [04:54:02] TomCat you mean? [04:55:47] I'm using MyEclipse, until now all my methods are defined like this: [04:55:48] @PUT [04:55:48] @Path("/{imageId}") [04:55:48] public String approveImage(@PathParam("imageId") Long imageId) { [04:56:03] I don't know how to define the method for receiving raw data [04:57:31] this makes sense for you? [05:00:18] bigbluehat (~bigblueha@adsl-74-177-96-212.gsp.bellsouth.net) joined #rest. [05:00:59] Gandalf84 (~Gandalf84@93-50-97-97.ip152.fastwebnet.it) left irc: [05:12:33] gchristensen (~gchristen@unaffiliated/grahamc) joined #rest. [05:13:50] gchristensen (~gchristen@unaffiliated/grahamc) left irc: Client Quit [05:32:45] peers (~ajp5103@128.118.235.29) joined #rest. [05:34:58] gchristensen (~gchristen@unaffiliated/grahamc) joined #rest. [05:38:38] blongden (~blongden@nocarrier.co.uk) joined #rest. [05:39:00] blongden (~blongden@nocarrier.co.uk) left #rest. [05:59:31] gchristensen (~gchristen@unaffiliated/grahamc) left irc: Quit: Leaving... [06:19:22] sbanwart (~sbanwart@h230.79.189.173.dynamic.ip.windstream.net) joined #rest. [06:24:17] bigbluehat (~bigblueha@adsl-74-177-96-212.gsp.bellsouth.net) left irc: Quit: Leaving. [06:26:54] Action: mamund is back [06:37:44] bradley-holt (~bradley-h@65-183-135-35-dhcp.burlingtontelecom.net) joined #rest. [06:45:58] Wombert (~Wombert@dslb-088-066-204-163.pools.arcor-ip.net) joined #rest. [06:49:19] bigbluehat (~bigblueha@adsl-74-177-96-212.gsp.bellsouth.net) joined #rest. [06:51:59] grove (~grove@aggw006.cappelendamm.no) left irc: Quit: grove [06:59:25] gchristensen (~gchristen@unaffiliated/grahamc) joined #rest. [07:02:44] gchristensen (~gchristen@unaffiliated/grahamc) left irc: Client Quit [07:30:53] bigbluehat (~bigblueha@adsl-74-177-96-212.gsp.bellsouth.net) left irc: Ping timeout: 252 seconds [07:32:05] kennethreitz (~kennethre@ip65-46-252-62.z252-46-65.customer.algx.net) joined #rest. [07:39:50] gchristensen (~gchristen@unaffiliated/grahamc) joined #rest. [07:42:25] wav1 (~Adium@24-155-228-96.dyn.grandenetworks.net) joined #rest. [08:08:48] grove (~grove@193.201.9.46.customer.cdi.no) joined #rest. [08:50:02] bigbluehat (~bigblueha@nmd.sbx08595.greensc.wayport.net) joined #rest. [08:51:42] bigbluehat (~bigblueha@nmd.sbx08595.greensc.wayport.net) left irc: Client Quit [09:17:22] DracoBlue (~Adium@ip-vlan-obckunde-02-217-66-60-14.pixelpark.net) joined #rest. [09:21:28] wav1 (~Adium@24-155-228-96.dyn.grandenetworks.net) left irc: Ping timeout: 244 seconds [09:22:38] wav1 (~Adium@24-155-228-96.dyn.grandenetworks.net) joined #rest. [09:28:06] KevBurnsJr (~KevBurnsJ@50.0.103.39) joined #rest. [09:29:15] kennethreitz (~kennethre@ip65-46-252-62.z252-46-65.customer.algx.net) left irc: Quit: Textual IRC Client: http://www.textualapp.com/ [09:32:20] bigbluehat (~bigblueha@adsl-74-177-96-212.gsp.bellsouth.net) joined #rest. [09:34:26] yippee! [09:34:48] my I-D has moved up another notch in the IETF pecking order... [09:34:54] http://datatracker.ietf.org/doc/draft-amundsen-item-and-collection-link-relations/ [09:35:11] offically assigned an Area Director. [09:35:35] Action: mamund does a happy dance \o\ /o/ [09:36:47] bigbluehat (~bigblueha@adsl-74-177-96-212.gsp.bellsouth.net) left irc: Ping timeout: 252 seconds [09:40:14] mephju_ (~mephju@dslb-094-222-029-097.pools.arcor-ip.net) left irc: Quit: Verlassend [09:42:54] DracoBlue (~Adium@ip-vlan-obckunde-02-217-66-60-14.pixelpark.net) left #rest. [09:46:35] congrats :) [09:50:13] :) [09:50:15] small victories [09:50:29] hopefully, this means it will go to "Last Call" soon [09:50:58] after that, it's an official RFC [09:52:03] nice [09:52:04] congrats [09:52:41] :) [09:52:50] i will soon be immortal [10:33:18] wav1 (~Adium@24-155-228-96.dyn.grandenetworks.net) left irc: Quit: Leaving. [10:41:30] wav1 (~Adium@24-155-228-96.dyn.grandenetworks.net) joined #rest. [10:53:49] bigbluehat (~bigblueha@adsl-74-177-96-212.gsp.bellsouth.net) joined #rest. [10:57:15] steveklabnik (steve@nat/xomb/x-bjpreexdfxfzpuzd) left irc: Quit: lololol [11:12:31] hobodave (~hobodave@pdpc/supporter/professional/hobodave) joined #rest. [11:12:36] hey everyone [11:14:03] I'm working on a RESTful web service strongly influenced by the books RESTful Web Services and the RESTful Web Services Cookbook [11:15:42] I can't seem to find what the best practice is in this particular situation. If I'm using custom Content-types such as: application/vnd.com.example.Company+json to return a representation of a Company that is found, what Content-Type should i use when I'm returning a 404 for a Company that is not found? [11:15:58] The same thing? There is no actual content so I'm a little confused [11:18:08] kennethreitz (~kennethre@204.14.152.118) joined #rest. [11:21:32] if you're not returning a response body at all, then you don't need to emit a Content-Type header [11:21:41] but i'd recommend you do [11:22:11] fu-manchu should it be the same content-type that the requested resource is? [11:22:13] and if you can return a response body for 404 that's the same C-T as you would for 200, that can make writing clients easier [11:22:45] it bites to be writing a client for JSON, for example, and then get handed a text/html or text/plain response [11:23:03] fu-manchu so you think I should return a Content-Type of application/vnd.com.example.Company+json and a response body of "{}" ? [11:23:32] I don't think it should be Company+json, but it should be json [11:23:53] you might want to define a vnd.com.example.Error+json [11:23:53] :| [11:24:03] nuclearsandwich (~nuclearsa@173.247.193.198) joined #rest. [11:24:05] you could always use an existing type [11:24:11] fu-manchu I do have a Messages+json that is used to communicate client side errors in detail [11:24:19] but it seems verbose for a simple 404 [11:24:35] (this is one reason I dislike new media types for different resource types) [11:24:45] I use it primarily for 400 errors in which I point out specific errors [11:24:59] the content type is the content type of the error message [11:25:15] if the error is rendered in your json, use that. If it's HTML then use that. [11:25:28] whartung and if I don't wish to give an error message other than the descriptive header? [11:25:36] 404 Not Found is wholly sufficient in my book [11:25:39] yea [11:25:45] then don't send anything [11:25:49] whartung so omit Content-Type altogether? [11:26:01] content type doesn't matter if size is 0 [11:26:03] yea [11:26:23] hobodave: what doe you vnd media type do ? [11:26:31] I think that makes sense whartung [11:26:49] you SHOULD return a response body: see http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-17#section-7.4 [11:26:51] mikekelly it canonically describes the content type [11:27:14] er. [11:27:17] ok :P [11:27:49] I meant more what can you actually represent with the media type [11:27:53] but the great thing about SHOULDs is "ignore as long as you understand the implications" ;) [11:28:04] mikekelly that's really specific to the internals of my application [11:30:05] do you think a custom media type is necessary then / [11:30:10] ? [11:31:02] hobodave: as in obligatory if you want to Do It Right(tm) [11:31:04] mikekelly yes, it permits me to define a contract about what a Company is [11:31:31] clients can make assumptions about the data provided with that Content-Type [11:31:35] folks seem to conflate media-types with application semantics...I think that's a mistake. [11:31:45] hobodave: how do clients get to a company resource ? [11:31:47] assumptions that are fundamentally different than a Ticket in my system [11:32:10] mikekelly through a URI [11:32:18] a link from another resource ? [11:32:23] mikekelly correct [11:32:47] and that link which leads them cannot set the context and act as the 'contract' ? [11:32:58] it certainly could [11:33:04] great [11:33:29] that's probably a lot easier to manage if you use a generic media type and define your application in termso f link relations [11:33:36] I think I'm missing your point. Right now it just seems like we have a differing opinion on how to use Content-Types [11:33:58] not really, I don't think specific media types are particularly good practice [11:34:07] exactly [11:34:23] I don't extend HTML to write a web app for browsers [11:34:25] where is darrel miller :/ [11:34:39] pimping HAL somewhere no doubt [11:34:46] more HAL [11:34:59] "Open the REST bay doors, HAL" [11:38:16] :) [11:38:30] He's the one and only resource for .NET for me.. [11:40:16] hobodave: so really, I'm just interested in understanding what lead to your taking that route [11:40:53] mikekelly my reading of the aforementioned books, and the convenience it offers with specific data types of mine, particular what I'm calling a Collection resource [11:41:22] convenience vs just using the link relations ? [11:41:31] clients can make useful assumptions about the Collection resource regarding pagination, resource counts, and iteration [11:41:57] or they can just use the link relations for pagination [11:42:00] Clients can make assumption of any media type [11:42:05] why do you believe those assumptions not be based from the preceding link relation ? [11:42:22] s/not/cannot [11:42:38] mikekelly I'm sorry I don't have time to further validate myself to you. I really do appreciate your help; I must get back to development though. [11:42:59] lol [11:43:03] bye [11:43:10] thanks again [11:43:14] you're so very welcome [11:58:28] nuclearsandwich (~nuclearsa@173.247.193.198) left irc: Remote host closed the connection [11:59:40] nuclearsandwich (~nuclearsa@173.247.193.198) joined #rest. [12:26:41] wav1 (~Adium@24-155-228-96.dyn.grandenetworks.net) left irc: Read error: Connection reset by peer [12:30:26] wav1 (~Adium@107.28.161.2) joined #rest. [12:30:45] Action: mamund does another happy dance! [12:31:03] my I-D just went to "Last Call" [12:37:58] wow [12:39:04] LOL, yeah [12:39:11] it's been sitting for a while [12:39:13] and it's very simple. [12:42:09] wav11 (~Adium@173.7.71.71) joined #rest. [12:44:41] wav1 (~Adium@107.28.161.2) left irc: Ping timeout: 240 seconds [12:55:22] wav1 (~Adium@107.28.112.74) joined #rest. [12:57:07] wav12 (~Adium@107.28.135.39) joined #rest. [12:57:57] wav11 (~Adium@173.7.71.71) left irc: Ping timeout: 244 seconds [12:59:35] wav1 (~Adium@107.28.112.74) left irc: Ping timeout: 252 seconds [13:01:22] wav1 (~Adium@173-106-3-43.pools.spcsdns.net) joined #rest. [13:03:37] wav12 (~Adium@107.28.135.39) left irc: Ping timeout: 252 seconds [13:22:14] wav1 (~Adium@173-106-3-43.pools.spcsdns.net) left irc: Ping timeout: 244 seconds [13:51:14] Action: mamund gotta go, toodles! [14:11:37] peers (~ajp5103@128.118.235.29) left irc: [14:19:06] bigbluehat (~bigblueha@adsl-74-177-96-212.gsp.bellsouth.net) left irc: Quit: Leaving. [14:23:57] sbanwart (~sbanwart@h230.79.189.173.dynamic.ip.windstream.net) left irc: Read error: Operation timed out [14:34:52] grove (~grove@193.201.9.46.customer.cdi.no) left irc: Quit: grove [14:50:30] kennethreitz (~kennethre@204.14.152.118) left irc: Ping timeout: 252 seconds [15:00:06] kennethreitz (~kennethre@204.14.152.118) joined #rest. [15:29:56] bradley-holt (~bradley-h@65-183-135-35-dhcp.burlingtontelecom.net) left irc: Quit: bradley-holt [15:45:40] Wombert (~Wombert@dslb-088-066-204-163.pools.arcor-ip.net) left irc: Quit: Wombert [16:35:40] sbanwart (~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net) joined #rest. [16:42:13] sbanwart (~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net) left irc: Read error: Operation timed out [16:42:35] sbanwart (~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net) joined #rest. [16:43:03] gchristensen (~gchristen@unaffiliated/grahamc) left irc: Quit: Leaving... [16:47:11] sbanwart_ (~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net) joined #rest. [16:48:23] sbanwart (~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net) left irc: Ping timeout: 252 seconds [16:54:53] Nick change: sbanwart_ -> sbanwart [16:55:37] kennethreitz (~kennethre@204.14.152.118) left irc: Ping timeout: 244 seconds [17:10:00] gchristensen (~gchristen@unaffiliated/grahamc) joined #rest. [17:14:31] gchristensen (~gchristen@unaffiliated/grahamc) left irc: Client Quit [17:15:29] sbanwart (~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net) left irc: Remote host closed the connection [17:16:10] sbanwart (~sbanwart@99.177.126.136) joined #rest. [17:34:09] gchristensen (~gchristen@unaffiliated/grahamc) joined #rest. [18:12:45] gchristensen (~gchristen@unaffiliated/grahamc) left irc: Quit: Leaving... [18:34:57] gchristensen (~gchristen@unaffiliated/grahamc) joined #rest. [18:35:14] gchristensen (~gchristen@unaffiliated/grahamc) left irc: Client Quit [18:37:32] nuclearsandwich (~nuclearsa@173.247.193.198) left irc: Remote host closed the connection [18:59:44] KevBurnsJr (~KevBurnsJ@50.0.103.39) left irc: [19:49:15] gchristensen (~gchristen@unaffiliated/grahamc) joined #rest. [20:27:53] sbanwart (~sbanwart@99.177.126.136) left irc: Ping timeout: 240 seconds [21:24:59] gchristensen (~gchristen@unaffiliated/grahamc) left irc: Quit: Leaving... [21:42:40] grove (~grove@193.201.9.46.customer.cdi.no) joined #rest. [21:45:22] grove (~grove@193.201.9.46.customer.cdi.no) left irc: Client Quit [22:28:15] grove (~grove@aggw006.cappelendamm.no) joined #rest. [22:30:35] quest88 (~quest88@c-98-207-205-137.hsd1.ca.comcast.net) joined #rest. [00:00:00] --- Fri Dec 9 2011