-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

...
> 
> Long term, I'd like to deprecate the root as a way of talking to
> the API and mandate (for instance) /api as a URL path. Short term,
> we can't do that, but we *can* treat, for instance /charm
> differently and serve PUT (and potentially GET requests) on that. 
> It's just a matter of adding a ServeMux  in apiserver.Server.run.
> 
> The other issue we'd need to deal with is authentication. I'd
> suggest we would specify that the URL parameters should include
> the user name and password. If we didn't want to do that, there
> are alternatives which I won't go into here as they're more
> complex.
> 
> So to summarise, the URL might look something like:
> 
> https://my.api.server/charm?user=admin&password=adminpassword&charmurl=cs:precise/wordpress
>
>  We'd do a PUT request on the above URL, sending the charm bundle.
> We may well want to add a secure hash of the charm bundle too, so
> that we can tell if the user accidentally drops the connection too 
> early.
> 
> I don't think that charms are generally big enough to warrant
> adding resumable uploads, at this point anyway.
> 
> How does that sound?
> 

Given all the stuff that you describe that actually needs to be done,
I don't quite see what we actually *gain* over just putting it into
the RPC. We don't have to do auth again, we don't have to have the
actual client connection suddenly switch from talking in one spot to
talking in another, etc.

I would be perfectly happy with PUT if we were already a RESTful API,
but it seems a bit strange to just tack that on, and will be a
one-more-special case that we run into when trying to debug, etc.
(logs will likely be different, working in the code will have to think
about multiple paths, etc.)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlJ6S1gACgkQJdeBCYSNAANS5wCgjgrvK9NYNsFrqwK4EpWZor8H
KUIAoK8y9qmw5OYaFjusM5qh3CzhIfyz
=oOmi
-----END PGP SIGNATURE-----

-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev

Reply via email to