Restler-API-Explorer
Restler-API-Explorer copied to clipboard
Explorer not showing when using useUrlBasedVersioning and AuthenitcationClass - 200 : OK ../resources.json
This one is driving me nuts and maybe its just me, but at least I can recreate the issue.
Explorer is giving me the following error;
200 : OK ../resources.json
I have worked out that its because of Authenitcation class and set useUrlBasedVersioning both included in the index.php. If you try each of the items separately then explorer works as expected. I do want both to work so I can show both versions in explorer.
Code used
Defaults::$useUrlBasedVersioning = true; // comment out to work and leave auth line
$r = new Restler();
$r->setAPIVersion(2);
$r->setSupportedFormats('JsonFormat', 'XmlFormat');
$r->addApiClass('Resources'); // this produces the needed resources.json
$r->addAPIClass('BMI');
$r->addAuthenticationClass('SimpleAuth'); // comment out to work and leave url line
$r->handle();
is this a bug or does it need to be refactored differently.
Cheer
Codemonkeyneo
Thanks for giving some sample code which will make it easy to reproduce the error, will check it ASAP
Possible solved my issue but not sure its correct way.
I have had to add the SimpleAuth class into a seperate version folder.... guess this could get messy ?
Is it possible to just have one auth class for all versions ?