Re: [mongrel2] JSON/XML Routing Syntax Documented
- From:
- Loic d'Anterroches
- Date:
- 2011-05-15 @ 09:24
Hello,
Could it be possible to have something like:
@host.chat
or
@chat.host (backward compatible)
and
<test.host ?
I am used to work a lot with virtual hosts, so maybe this is just a
misconception from my side that I need the equivalent for all the protocols.
loïc
On 05/15/2011 08:35 AM, Zed A. Shaw wrote:
> On Fri, May 13, 2011 at 05:27:39PM +0200, Lionel Orry wrote:
>> On Fri, May 13, 2011 at 5:16 PM, Zed A. Shaw<zedshaw@zedshaw.com> wrote:
>>> Updated the documentation to explicitly document the JSON/XML routing
>>> syntax:
>>>
>>> http://mongrel2.org/static/mongrel2-manual.html#x1-360003.6.2
>>>
>>> Let me know what you think.
>>
>> Very small detail. You say the NUL byte is mandatory for both JSON and
>> XML messages, so maybe it would be worth insisting by showing the \0
>> byte at the end of the XML stream example:
>
> Cool, I'll update it with that too.
>
Re: [mongrel2] JSON/XML Routing Syntax Documented
- From:
- Zed A. Shaw
- Date:
- 2011-05-15 @ 15:35
On Sun, May 15, 2011 at 11:24:01AM +0200, Loic d'Anterroches wrote:
> Hello,
>
> Could it be possible to have something like:
>
> @host.chat
> or
> @chat.host (backward compatible)
That was my idea for the JSON one, either that or in a query parameter:
@chat?host=zedshaw.com
That actually should work.
> and
>
> <test.host ?
The XML mode would get really weird if that were allowed, but I can play
with it and see. The other option is to parse the first attrib and
make:
<test host="zedshaw.com"
Work.
--
Zed A. Shaw
http://zedshaw.com/
Re: [mongrel2] JSON/XML Routing Syntax Documented
- From:
- Loic d'Anterroches
- Date:
- 2011-05-16 @ 08:23
Hello,
On 05/15/2011 05:35 PM, Zed A. Shaw wrote:
> On Sun, May 15, 2011 at 11:24:01AM +0200, Loic d'Anterroches wrote:
>> Hello,
>>
>> Could it be possible to have something like:
>>
>> @host.chat
>> or
>> @chat.host (backward compatible)
>
> That was my idea for the JSON one, either that or in a query parameter:
>
> @chat?host=zedshaw.com
>
> That actually should work.
>
>> and
>>
>> <test.host ?
>
> The XML mode would get really weird if that were allowed, but I can play
> with it and see. The other option is to parse the first attrib and
> make:
>
> <test host="zedshaw.com"
In one way or another this would be great, because it would help me have
more homogenous setup when deploying several applications, all using
json or xml on several hosts. Everything would be self contained into
one host and not one host plus a mix in the default host.
Thanks a lot,
loïc
Re: [mongrel2] JSON/XML Routing Syntax Documented
- From:
- Zed A. Shaw
- Date:
- 2011-05-16 @ 18:02
On Mon, May 16, 2011 at 10:23:56AM +0200, Loic d'Anterroches wrote:
> In one way or another this would be great, because it would help me have
> more homogenous setup when deploying several applications, all using
> json or xml on several hosts. Everything would be self contained into
> one host and not one host plus a mix in the default host.
http://mongrel2.org/tktview/7041d0123de9bfea45d685f7c6d09f0334eaca32
Done, I'll try to make it work.
--
Zed A. Shaw
http://zedshaw.com/