Add option to ApiFormatRaw to generate a HTTP errorcode
authorDerk-Jan Hartman <hartman.wiki@gmail.com>
Fri, 4 Sep 2015 19:13:21 +0000 (21:13 +0200)
committerDerk-Jan Hartman <hartman.wiki@gmail.com>
Fri, 4 Sep 2015 20:52:06 +0000 (22:52 +0200)
commit483e9d3cdbe45e0214e7da56b89f299c06348f90
tree1f2485f1dc39bd20c1a3db9adfdab6123a252975
parent4b7ba45d0c20609fc376b081ae80810e8d6e88d4
Add option to ApiFormatRaw to generate a HTTP errorcode

New method setFailWithHTTPError() allows you to configure ApiFormatRaw
to return HTTP status code 400 in case it encounters (any) error.
This is useful for when the output format is intended to be read by a
user-agent which has no other method to be notified of errors.

Change-Id: I11b2824c6725143cff5b4c56194f94c44ce451c0
includes/api/ApiFormatRaw.php