All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Mitchell <jeffrey.mitchell@gmail.com>
To: Dimitri Maziuk <dmaziuk@bmrb.wisc.edu>
Cc: ceph-devel@vger.kernel.org
Subject: Re: rest mgmt api
Date: Wed, 06 Feb 2013 20:45:07 -0500	[thread overview]
Message-ID: <51130723.3030101@gmail.com> (raw)
In-Reply-To: <5112D723.3030500@bmrb.wisc.edu>

Dimitri Maziuk wrote:
> (Last I looked "?op=create&poolname=foo" was the Old Busted CGI, The New
> Shiny Hotness(tm) was supposed to look like "/create/foo" -- and I never
> understood how the optional parameters are supposed to work. But that's
> beside the point.)

They're different. One is using the path to interpret functionality; one is using query parameters. The former requires custom path parsing/interpreting code for your particular application; the latter is a very well supported/understood way of getting key/value pairs.

Neither is right or wrong, they're just different. People seem to prefer the path method these days because it seems cleaner/nicer; the other thing people do is just POST the parameters instead of GETting, which lets you still use key/value parameters but not have an ugly URL.

--Jeff

  reply	other threads:[~2013-02-07  1:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06 17:25 rest mgmt api Sage Weil
2013-02-06 18:15 ` Yehuda Sadeh
2013-02-06 19:05   ` Wido den Hollander
2013-02-06 19:22   ` Dan Mick
2013-02-06 19:25   ` Joao Eduardo Luis
2013-02-06 19:34     ` Sage Weil
2013-02-06 19:51       ` Dimitri Maziuk
2013-02-06 20:14         ` Sage Weil
2013-02-06 21:19           ` Dan Mick
2013-02-06 22:20           ` Dimitri Maziuk
2013-02-07  1:45             ` Jeff Mitchell [this message]
2013-02-11 20:04           ` Gregory Farnum
2013-02-11 22:00             ` Sage Weil
2013-02-11 22:38               ` Dimitri Maziuk
2013-02-11 22:41               ` Gregory Farnum
2013-02-12  0:51                 ` Sage Weil
2013-02-06 19:36     ` Dan Mick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51130723.3030101@gmail.com \
    --to=jeffrey.mitchell@gmail.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dmaziuk@bmrb.wisc.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.