cool

so for output:
?format=foo or JSON as default

for input:
Check for content type (more priority than ?format=foo)
then ?format=foo
or JSON default.

is these ok?

ropu

On Mon, Sep 15, 2008 at 5:06 PM, Chris Chabot <[EMAIL PROTECTED]> wrote:

> Well no not completely.
>
> Right now the PHP version uses the content_type header for *input* format,
> and the &format=foo for the output format. The java version uses the query
> param (&format=foo) for both.
>
> The proposed solution would allow you to use a "Content-Type:
> application/xml" for input (iaw xml), and format=json for output (which btw
> would be silly to do, but hey it could happen, php will support this
> anyhow,
> the java guys might, or might not allow for the mixing).
>
> Only of the Content-Type header is *not* set, it looks at the &format=foo
> for the *input* (and ofc uses the same param for output too).
>
> If no content type is set for input, and no format=foo is set for output,
> it
> will assume both to be json.
>
> Hope that clears it up :)
>
> On Mon, Sep 15, 2008 at 8:08 PM, Ropu <[EMAIL PROTECTED]> wrote:
>
> > This assumes that input and output will have the same format if the
> > ?format=foo is set based on the POST/GET format?
> >
> >
> > On Mon, Sep 15, 2008 at 2:07 PM, Chris Chabot (JIRA) <[EMAIL PROTECTED]
> > >wrote:
> >
> > > Input format detection
> > > ----------------------
> > >
> > >                 Key: SHINDIG-601
> > >                 URL: https://issues.apache.org/jira/browse/SHINDIG-601
> > >             Project: Shindig
> > >          Issue Type: Bug
> > >          Components: RESTful API (Java), RESTful API (PHP)
> > >            Reporter: Chris Chabot
> > >
> > >
> > > Currently PHP uses the content_type header to detect the input format.
> On
> > > the other hand Java uses the format query param (?format=foo) for the
> > input
> > > format selection.
> > >
> > > Most logical solution seems to be that we both use :
> > >
> > > if ( content type is set)
> > >   use content_type
> > > else if (format query param is set)
> > >   use query param
> > > else
> > >  use json
> > >
> > > I *think* that will be what developers would expect :)
> > >
> > > --
> > > This message is automatically generated by JIRA.
> > > -
> > > You can reply to this email to add a comment to the issue online.
> > >
> > >
> >
> >
> > --
> > .-. --- .--. ..-
> > R  o  p  u
> >
>



-- 
.-. --- .--. ..-
R  o  p  u

Reply via email to