incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik <mfoj...@redhat.com>
Subject Re: Support for OPTIONS and HEAD calls in API
Date Sun, 06 Feb 2011 11:20:59 GMT
Hi,

On Feb 5, 2011, at 1:54 AM, David Lutterkort wrote:

> On Thu, 2011-02-03 at 15:11 +0100, mfojtik@redhat.com wrote:
>> This patch will add support for querying collections and operation for
>> basic capabilities like supported HTTP methods, operations and params.
> 
> Looks good.
> 
>> For collections there is OPTIONS and HEAD call where:
>> 
>> * OPTIONS /api/instances
>>  This will return HTTP header X-Operations-Allowed with list of
>>  operations defined for this collection (create,index,destroy...)
> 
> Shouldn't we also generate an Allow header similar to the one for the
> HEAD request ? (btw, is there a command line tool that will generate
> OPTIONS requests ? I had to try this with telnet)

Yes, I will add HEAD to collection as well.
For testing, you can use 'RestClient' gem (just type 'restclient' on console)
Then: 

RestClient.options('http://localhost:3001/api/instances').headers

Will print HTTP headers. Use '.head' for HEAD ;-)

>> Let me know if you found this usefull or you have some suggestions/hints
>> for concept/header names...
> 
> ACK. Looks good to me.

Thanks for review! I'll push this on Monday.


  -- Michal

Michal Fojtik
Software Engineer, Deltacloud API project
http://www.deltacloud.org
mfojtik@redhat.com



Mime
View raw message