Should PUT, POST accept query args plus payload?

"John P. Rouillard" <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
Hi all:

While I was making some changes in the REST code last week it occurred
to me that controlling:
   the level of detail in the output (@verbose),
   the output format (@pretty)
   and version (@apiver)

are done via query strings in the URL used with the GET method. E.G.

  @verbose=0|1|2|3   default 1
  @pretty=true|false  default true
  @apiver=<integer> default is default api version unless version is set
     with header "Accept: type/subtype; version=1"

When we do a PUT, a partial payload is displayed the looks much like
what you would see with GET. The @apiver query param could be used
with any method to control how the server interpret query params or
payloads.

It is possible to set these query params in the payload for PUT/POST.

The question is should we allow/parse query arguments in the URL for
methods like PUT/POST/PATCH?

I am leaning toward not supporting query params for methods other than
GET. The payload would include these params like:

  { "data": {"title": "a new title", "@apiver": "2" } }

Note currently these params are all ignored unless the method is GET.

Thoughts?

--
				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.