mirror of
https://github.com/rmaake1/httpstatuses.git
synced 2024-10-04 15:17:23 +02:00
readme musings
This commit is contained in:
parent
b0504525e1
commit
64caed92cd
@ -64,6 +64,10 @@ turning new lines into linebreaks, if you wish to include HTML that's fine
|
||||
- Add some sort of "global reference" system, where a code reference can be
|
||||
added that applies to all status codes based on a property, eg: adding an http
|
||||
status cats (http://httpcats.herokuapp.com/) link to each code page
|
||||
- configure httpstatuses.com to redirect
|
||||
- Decide on whether or not to add a method to return a specific class of error
|
||||
codes, eg: 4xx, 5xx. Not sure if httpstatus.es/{class} makes sense (eg:
|
||||
httpstatus.es/5) or httpstatus.es/{class}xx (eg: httpstatus.es/5xx)
|
||||
|
||||
## notes
|
||||
|
||||
|
@ -4,7 +4,7 @@ class Httpstatuses
|
||||
{
|
||||
public static function statuses($class = "*")
|
||||
{
|
||||
$class_files = glob("codes/*.json");
|
||||
$class_files = glob("codes/$class.json");
|
||||
|
||||
foreach($class_files as $class_file)
|
||||
{
|
||||
|
@ -9,19 +9,12 @@
|
||||
$response->render('views/index.php', array("class_list" => $class_list));
|
||||
});
|
||||
|
||||
respond('/generator', function($request, $response) {
|
||||
// generator here
|
||||
});
|
||||
|
||||
respond('/[i:id]', function($request, $response) {
|
||||
$status_code = $request->param('id');
|
||||
$code = Httpstatuses::status($status_code);
|
||||
|
||||
if(!$code)
|
||||
{
|
||||
$response->code(404);
|
||||
$response->render('views/404.php');
|
||||
}
|
||||
|
||||
$response->render('views/status_code.php', $code);
|
||||
});
|
||||
|
@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>(Actual) 404 — httpstatus.es</title>
|
||||
<title>404real — httpstatus.es</title>
|
||||
<link rel="stylesheet" href="assets/css/style.min.css" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user