[OTDev] encoding accept header MIME types in URI

Nina Jeliazkova jeliazkova.nina at gmail.com
Tue Jan 11 11:38:04 CET 2011


Hi Martin,

On 11 January 2011 12:13, Martin Guetlein <martin.guetlein at googlemail.com>wrote:

> Hello all,
>
> is there a standardized way to encode MIME types in URIs instead of
> using the accept-header?
>
> For example Ambits services allow to specifiy this via 'media' parameter:
>
> http://apps.ideaconsult.net:8080/ambit2/compound/4025/conformer/462030?media=image/png
> @Nina
> How did you decide to use 'media'?
>

This is an (optional) support by Restlet library. There is so-called "Tunnel
service" , which could be turned on (off by default) and will accept "media"
parameter to specify MIME type.

There is also "method" parameter, allowing to "tunnel" all HTTP methods via
GET. (e.g. curl -X GET /dataset/999?method=DELETE )


> Have other partners implemented something similar?
>

I guess it is easy for all partners using Restlet to turn the tunnel service
on.

AFAIK, there is no standard solution for this kind of workaround. If there
are no preferences from other REST frameworks , we might decide to include
"media" parameter in the API as well.  It is quite convenient to "deceive"
browsers ...

Best regards,
Nina


>
> I am asking because I would like to extend the compound API (I need
> the pictures for the reports).
>
> Best regards,
> Martin
>
> --
> Dipl-Inf. Martin Gütlein
> Phone:
> +49 (0)761 203 8442 (office)
> +49 (0)177 623 9499 (mobile)
> Email:
> guetlein at informatik.uni-freiburg.de
> _______________________________________________
> Development mailing list
> Development at opentox.org
> http://www.opentox.org/mailman/listinfo/development
>



More information about the Development mailing list