+1 for adding "force" in JSON body; used to be a JEE developer for several
years, there's a general practice to us: query argument (e.g.
"?force=true") is ONLY used by 'GET', all "data" are in body if action is
'POST' (e.g. UPDATE, DELETE). The reason is complex: security, meaning of
HTTP action, search engine, and so on.

----
Da (Klaus), Ma (马达) | PMP® | Advisory Software Engineer
Platform OpenSource Technology, STG, IBM GCG
+86-10-8245 4084 | [email protected] | http://k82.me

On Fri, Jan 15, 2016 at 9:40 AM, Marco Massenzio <[email protected]>
wrote:

> +1 for Lukas's suggestion to have `force` be a query argument (eg,
> ``?force=true``) and the body respect the ``Content-Type`` header.
>
> (although I was part of the conversation of adding the ``force`` flag to
> the SUBSCRIBE message, I forget the exact details of that one - @Vinod may
> be able to chime in).
>
> Thanks for getting the conversation started!
>
> --
> *Marco Massenzio*
> http://codetrips.com
>
> On Thu, Jan 14, 2016 at 11:09 AM, Alex Rukletsov <[email protected]>
> wrote:
>
> > Folks,
> >
> > I would like to gather your opinions about a concern related to operator
> > HTTP endpoints. From one side we agreed that for simplicity and
> consistency
> > we should bake all request data in a single JSON. From the other side,
> some
> > parameters, like a force flag, do not really belong to request JSON (as
> > pointed out by some SRE guys in comment to MESOS-3914 [1]). The force
> flag
> > is not really related to the request itself, but more to the way the
> > request should be processed.
> >
> > To my knowledge, currently we use the force flag in two places:
> >   * Subscribe call in framework API.
> >   * Quota set request.
> >
> > Currently we have the 'force' field in JSON both cases.
> >
> > I would like us to agree on the way we write endpoints and clean-up
> > existing ones *before* we release Mesos 1.0. Looking forward to your
> > feedback.
> >
> > AlexR
> >
> > [1] https://issues.apache.org/jira/browse/MESOS-3914
> >
>

Reply via email to