Part of the problem is that the REST api does not return anything when it probably should. For instance when new resources are created it makes sense to send back the "default" representation of the created resource.
That said, I guess there still will be instances where there is an empty response. So yeah, +1 on setting a default content type. Do you have the doc handy that references sending back a custom mime type as a REST best practice? David Winslow wrote: > Hey all, > > There's a thread on the users list from someone trying to build a Groovy > client to the REST API. The typical way of talking to HTTP services in > Groovy is the HTTPBuilder wrapper around Apache HTTPClient, and it > appears to make some assumptions (in particular, that requests will > always have a content-type.) It seems like we could accommodate that > fairly easily, by ensuring some sufficiently bland content-type is used > for the empty-body responses in the REST API. (By bland I mean unlikely > to cause clients to try to parse the content. I think we could go with > text/plain, but I have seen it recommended that REST APIs define custom > mime types for all their messages so that might be a good idea too.) > > -- > David Winslow > OpenGeo - http://opengeo.org/ > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Geoserver-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geoserver-devel -- Justin Deoliveira OpenGeo - http://opengeo.org Enterprise support for open source geospatial. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
