On Mon, Aug 27, 2018 at 9:39 PM Luc Larochelle <llaroche...@gmail.com>
wrote:

> Hi, what's the proper way to render a status code and a json message at
> the same time ?
>

*$ perl -Mojo -E 'a("/" => {status => 404, json => {error => "not
found"}})->start' get -v /*
GET / HTTP/1.1
User-Agent: Mojolicious (Perl)
Content-Length: 0
Host: 127.0.0.1:41463
Accept-Encoding: gzip

*HTTP/1.1 404 Not Found*
Server: Mojolicious (Perl)
Content-Type: application/json;charset=UTF-8
Content-Length: 21
Date: Tue, 28 Aug 2018 02:46:28 GMT

*{"error":"not found"}*

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to