On Thu, May 25, 2006 2:47 pm, Craig McClanahan wrote:
> I would expect a well-behaved client to set the content type on the
> incoming
> request to "text/xml" for XML content, so you should be able to check
> that.

Yes, I think that's a reasonable assumption (something, I'm ashamed to
say, my Ajax code doesn't do!).  Doesn't sound at all like an unreasonable
requirement either.

> Likewise, isn't JSON content supposed to be sent with "text/javascript"?

Not sure, but I'll check on that.  It definitely *sounds* right, and
again, probably isn't an unreasonable requirement in any case.  I was
actually thinking of a String property in the Action that defines what
type the request is, but your answer is I think definitely better.

>
> On output, (b) takes the Action and generates JSON from its fields.
>
>
> And you should, of course, set the correct content type on the response
> too.

Yes, agreed.  *That* I usually do at least :)

> Craig

Thanks Craig, I think your suggestions will defnitely make it work out
better.  Off to work I go now :)

Frank

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to