httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Houser, Rick" <rick.hou...@jackson.com>
Subject RE: JSON for mod_status
Date Wed, 30 Nov 2016 21:42:08 GMT
Personally, I'd rather have XML, but it may make sense to support multiple machine readable
formats down the line.  As such, using a new parameter for every possibility gets messy. 
If this gets implemented as a get parameter, how about making one parameter with multiple
potential values down the line?  It's not like they would all have to be implemented up-front.

?type=json
?type=xml
?type=js
?type=csv
Etc.

As to accept headers, that's a pain in the butt if someone just wants to grab a copy of the
data for debugging a custom parser or something.  So much easier to just wget BLAH than to
mess with the accept headers on any utility we want to fetch with.


Rick Houser
Web Administration

> -----Original Message-----
> From: Jordan Gigov [mailto:coladict@gmail.com]
> Sent: Wednesday, November 30, 2016 13:20
> To: dev@httpd.apache.org
> Subject: Re: JSON for mod_status
> 
> I think a better approach than "?json=true" would be to to respect the
> "Accept" header values of "application/json" and "text/json" if they
> have the higher priority.
> XML output should also be an option, if it will indeed serve as an API
> end-point.
> 
> On 30 November 2016 at 20:08, Luca Toscano <toscano.luca@gmail.com>
> wrote:
> >
> >
> > 2016-11-30 19:03 GMT+01:00 Daniel Gruno <humbedooh@apache.org>:
> >>
> >> On 11/30/2016 06:54 PM, Jim Jagielski wrote:
> >> > I'm thinking about adding JSON support to mod_status...
> >> > the "plain" version output really stinks and lacks parity
> >> > w/ the info we provide via HTML, and it would be nice
> >> > to produce a really easily parseable format.
> >> >
> >> > Thoughts...?
> >
> >
> > +1, this will simplify a lot things like metrics collectors polling httpd
> > regularly (that don't need a nice html format).
> >
> >> +1, a ?json=true or some such to the query would be helpful.
> >> so you could do
> >> /server-status?json=true
> >> or
> >> /server-status?auto&json=true
> >>
> >
> > +1, I like the idea!
> >
> > Thanks!
> >
> > Luca
> >
Mime
View raw message