process($request); echo json_encode(array('gadgets' => $response)); } else { throw new \Exception("No post data set"); } } catch (\Exception $e) { header("HTTP/1.0 500 Internal Server Error", true, 500); echo "
"; print_r(debug_backtrace()); echo ""; } echo ""; } } public function doGet() { header("HTTP/1.0 400 Bad Request", true, 400); echo ""; echo "